1

I performed action TRUNCATE TABLE TABLENAME IMMEDIATE; but I did not used DROP STORAGE option. I read that it is default option if it is not put. It was not so big table regarding table space but I am still interested if command I executed released database disk space on the server or not? I am not able to conculde that based on current disk space.

I would like confirmation for this? Also I would like to know did I have to do DB2 REORG for this table after the TRUNCATE?

1 Answer 1

1

You can use LIST TABLESPACES SHOW DETAIL to check the High Water Mark. If it still appears high, you can always issue an ALTER TABLESPACE <tablespace> REDUCE MAX (assuming you are on automatic storage). The commands for old-style DMS are a litte different.

I have another answer where I list that information

7
  • Hi Chris, please can you tell me if I did not use DROP STORAGE option was it used by default by the system or not? and should DB2 REORG be run or not after doing the truncate or database server is smart enough to handle fragment parts on that before after the truncate?
    – Dejan
    Feb 12, 2015 at 7:10
  • IBM Knowledge Center shows that DROP STORAGE is the default: www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/… Feb 12, 2015 at 14:18
  • It may not be a bad idea to run REORGS and RUNSTATS and a reset of the high water mark after a large removal of data. Occasionally, DB2 will not release the disk back to the OS and you need to run those commands to make it do so. Feb 12, 2015 at 14:20
  • Hi Chris.. thank you..ok I will run  Db2 runstats on table TABLENAME on key columns and indexes all and also DB2 REORG TABLE TABLENAME
    – Dejan
    Feb 12, 2015 at 14:46
  • @ChrisAldrich If you TRUNCATE a table, REORG is unnecessary. What is left to reorg? Feb 12, 2015 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.