drop projections, update query performance
Hallo Stephen, We have a problem. We have a large table oaslt.pts_raw_data_delivery_detail with two projections. Because of our hourly updates on this table, I created two new projections. After the refresh of these two new projections, we wanted to drop the old ones. But the drop was not successful: The result: vsql:/home/vertica/dba/drop_projections.sql:6: ROLLBACK 4470: Projection cannot be dropped because history after AHM would be lost DETAIL: Current AHM epoch = 632121 HINT: Use make_ahm_now() to move the AHM epoch to the present. Use set_ahm_epoch() only if you rely on historical queries (AT EPOCH/TIME) So we executed: select make_ahm_now(); And tried to drop the projections again. But no success, them same output message. How can we drop the old projections? We also saw, that our update on this table takes up to 10 times longer than before. Is this, because we have now 4 projections with 2 different sort orders for this table? Please help. Thank you. Best regards Katrin
0
Comments
Im not sure that it is issue of HistoryRetentionTime, but looks very similar. [DUPLICATE]
https://community.vertica.com/vertica/topics/get_last_good_epoch_not_advancing_so_cant_drop_old_proj...
Try the below:
Verify the output refresh_epoch with current_epoch, they should be uptodate - rather same
dbadmin=> select current_epoch,last_good_epoch, ahm_epoch, refresh_epoch from system;
if not then run
dbadmin=>select start_refresh();
probably projections are not refreshed properly.
Prasanta pointed towards unrefreshed projections, which is the likeliest cause of AHM being held back. Check the projections table for projections that are not is_up_to_date. You may want to drop them, or refresh them, once you see the list.
Our DBA team worked with your support.
After a few hours they were able to set the ahm_time to now
and then the drop of the projections was no problem.