What is the difference between truncate and delete? Why is one faster?
Answer / Vimal Kumar
Truncate and Delete are both used to remove data from a table, but they behave differently. Truncate quickly sets the number of rows in a table to zero and releases the space occupied by the table. It does not generate redo or undo logs, making it faster than Delete. On the other hand, Delete removes specific rows based on a WHERE clause and generates redo and undo logs. A full table scan will behave similarly after both operations.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are bind variables and why are they important?
Is it necessary to have database in archive log mode in configuration dataguard , if yes then why?
What is ora-1555 snapshot too old error? Explain in detail?
Explain force logging feature in 9i.
What is the difference between truncate and delete? Why is one faster?
How can you determine if an index needs to be dropped and rebuilt?
Who is dba in dbms?
What are the functions of administration?
You see multiple fragments in the system tablespace, what should you check first?
What is the most important action a dba must perform after changing the database from noarchivelog to archivelog?
Which rman command is used to create an exact replica of a database innew host?
What is oracle full backup?