Abhishek Sakhuja
Abhishek Sakhuja

Reputation: 222

Netezza Groom table is not removing deleted records

Below is the tested SQL code in Aginity that i have tried to track how grooming table works but i have checked it several times and to my surprise deleted records does exists in the table. Is there any time frame for them to be removed?

--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; 

Upvotes: 1

Views: 6367

Answers (1)

r.m
r.m

Reputation: 374

try:

GROOM TABLE AS_TEST_WORK RECLAIM BACKUPSET NONE;

By default, groom only removes records if they've been backed up. This is documented here

Upvotes: 1

Related Questions