[英]Amazon Redshift VACUUM was not successful
My table had 17500000 rows, 我的表有17500000行,
I deleted 500k rows. 我删除了50万行。 After deleting, I ran the vacuum command. 删除后,我运行了vacuum命令。
According to SVV_VACUUM_SUMMARY , row_delta is difference in the total number of table rows before and after the vacuum. 根据SVV_VACUUM_SUMMARY ,row_delta是真空之前和之后的表行总数之差。
But when I saw the SVV_VACUUM_SUMMARY table, row_delta is 0. Shouldn't it be 500K? 但是,当我看到SVV_VACUUM_SUMMARY表时,row_delta为0。不是500K吗?
Also here's the output from STL_VACUUM table: 这也是STL_VACUUM表的输出:
status rows sortedrows 状态行sortedrows
Started 17500000 813055 已开始17500000 813055
Finished 17500000 17500000 已完成17500000 17500000
Does this mean Vacuum wasn't successful as the rows for finished is same as when it was started? 这是否意味着真空不成功,因为完成的行与开始时的行相同?
Also SVV_VACUUM_PROGRESS has status as complete for the table. SVV_VACUUM_PROGRESS的状态也为该表的完成状态。 So want to confirm if it was successful or not. 所以想确认它是否成功。
And checked SVV_TABLE_INFO for my table and tbl_rows has 17500000. I don't know what should be done as I think tbl_rows should be 17000000 as the vacuum operation was successful. 并检查了我的表的SVV_TABLE_INFO ,并且tbl_rows的值为17500000。我不知道应该执行什么操作,因为我认为真空操作成功后tbl_rows应该为17000000。
Any help would be appreciated. 任何帮助,将不胜感激。
You can use the view svv_table_info
to confirm whether the table is correctly vacuumed. 您可以使用视图svv_table_info
确认表是否正确svv_table_info
。
If, for some reason, running VACUUM my_table TO 100 PERCENT
does not result in a change in the unsorted
value in svv_table_info
you will need to perform a deep copy . 如果由于某种原因将VACUUM my_table TO 100 PERCENT
运行VACUUM my_table TO 100 PERCENT
并没有导致svv_table_info
unsorted
值发生变化,则需要执行深度复制 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.