Hi,
I am using DB2 V9.7 fp 3a on linux box. I had a table in database whose size was about 365Gb and had about 80million records. Due to table big size we decided to delete old data. After deleting, the records in tables are 6 million but there is not much drop in the table size. Table size is about 325GB.
After deleting the records, I ran reorg and runstats as well on the table.
Command which I used to calculate table size was:
SELECT SUBSTR(TABSCHEMA,1,20) AS TABSCHEMA, SUBSTR(TABNAME,1,20) AS TABNAME, (SUM(DATA_OBJECT_P_SIZE)+ SUM(INDEX_OBJECT_P_SIZE)+ SUM(LONG_OBJECT_P_SIZE)+ SUM(LOB_OBJECT_P_SIZE)+ SUM(XML_OBJECT_P_SIZE)) AS TABLE_SIZE_IN_KBS FROM SYSIBMADM.ADMINTABINFO where tabschema='SCHEMA_NAME' and tabname='TABLE_NAME' group by tabschema,tabname"
Can you please tell me why the size did not decreased after deleting almost 70million records or I need to do something else ? thanks in advance
I am using DB2 V9.7 fp 3a on linux box. I had a table in database whose size was about 365Gb and had about 80million records. Due to table big size we decided to delete old data. After deleting, the records in tables are 6 million but there is not much drop in the table size. Table size is about 325GB.
After deleting the records, I ran reorg and runstats as well on the table.
Command which I used to calculate table size was:
SELECT SUBSTR(TABSCHEMA,1,20) AS TABSCHEMA, SUBSTR(TABNAME,1,20) AS TABNAME, (SUM(DATA_OBJECT_P_SIZE)+ SUM(INDEX_OBJECT_P_SIZE)+ SUM(LONG_OBJECT_P_SIZE)+ SUM(LOB_OBJECT_P_SIZE)+ SUM(XML_OBJECT_P_SIZE)) AS TABLE_SIZE_IN_KBS FROM SYSIBMADM.ADMINTABINFO where tabschema='SCHEMA_NAME' and tabname='TABLE_NAME' group by tabschema,tabname"
Can you please tell me why the size did not decreased after deleting almost 70million records or I need to do something else ? thanks in advance