Netezza Groom表未删除已删除的记录

时间:2014-10-09 11:05:27

标签: sql netezza

以下是Aginity中测试的SQL代码,我试图跟踪修饰表的工作原理,但我已经多次检查过,令我惊讶的是,删除的记录确实存在于表中。是否有任何时间框架可供移除?

--1382159 records

SELECT COUNT(*) FROM AS_TEST_WORK;

--1111 records deleted

DELETE FROM AS_TEST_WORK WHERE rrn_num LIKE '324%'; 

--setting deleted records for a display

SET show_deleted_records = true;  

--So i can see the deleted records

SELECT createxid, deletexid, COUNT(*) from AS_TEST_WORK GROUP BY 1, 2 ORDER BY 1;

--Groom table command to remove the deleted records permanently

GROOM TABLE as_test_work records all;  

--Re confirming by setting for a display

SET show_deleted_records = true; 

--To my surprise i can still see the deleted records

SELECT createxid, deletexid, COUNT(*) from AS_TEST_WORK GROUP BY 1, 2 ORDER BY 1; 

1 个答案:

答案 0 :(得分:1)

尝试:

  

GROOM TABLE AS_TEST_WORK RECLAIM BACKUPSET NONE;

默认情况下,groom只会在已备份的情况下删除记录。记录在案here