Page 1 of 1

Truncate in DB2 Enterprise and in Oracle Enterprise

Posted: Wed Aug 26, 2009 2:47 am
by saikir
Hi All,

I would like to how does a truncate command behave in each of the database stages

DB2 Enterprise: Does it use the load and replace option to truncate data or does it do a delete from <table>. Also by default will this commands be captured in the redologs

Oracle Enterprise. Does it use the Truncate command or delete from <table>

Any inputs will be well appreciated.

Thanks,
Sai

Posted: Wed Aug 26, 2009 5:35 am
by chulett
OE: Truncate is truncate. The word 'clear' is used for the transactional 'delete from table' operation.

DB2: no clue.

Posted: Wed Aug 26, 2009 5:44 am
by ArndW
Since DB2 has no truncate, it will do a DELETE rather than the (more complex) load method to delete entries.

Posted: Wed Aug 26, 2009 10:20 am
by arnabdey
You can check the log... It does a simple delete.... for truncate and load use the db2 load stage in case you have very huge data volume and you want a replace load...