Which is faster delete or truncate?



Which is faster delete or truncate?..

Answer / Ankit Bhatnagar

"Truncate" operation is generally faster than a "DELETE" operation because it quickly removes all rows from a table, without actually writing any deletion logic to the database log. Deleting data row by row takes longer as each row must be individually removed and logged.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB2 Interview Questions

In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?

1 Answers  


What is dbrm? When it will be created?

1 Answers  


How do you define a correlated name?

1 Answers  


How does cobol compile db2 program?

1 Answers  


How can you classify the locks in db2?

1 Answers  


What is the use of db2 optimizer?

1 Answers  


When reorg is used?

1 Answers  


I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to retrieve a column data from B table. How will you write a query?

3 Answers   CTS,


Is it mandatory to use DCLGEN? If not, why would you use it at all?

2 Answers  


What is the cobol picture clause of the db2 data types date, time, timestamp?

1 Answers  


Say CUST Table contains records like: CUSTNO CUSTNAME CUSTLOC 100 ABC SSS 200 XYZ 300 PQR 400 MNO WWW 500 CVV ------------- ------------- Now write a query to retrieve all records with CUSTLOC no data.

3 Answers   IBM,


How to find primary key of a table in db2?

1 Answers  


Categories