What is the difference between truncate and delete? Why is one faster? Can we rollback both? How would a full table scan behave after?
Answer / Kiran Kumari
Truncate and Delete are used to remove data from a table, but they have differences in behavior. 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. 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. Both Truncate and Delete do not support rolling back.
| Is This Answer Correct ? | 0 Yes | 0 No |
How can you find all the processes on your system?
What are the possible ways to gain information regarding the control file?
Explain the wait events in statspack report 'db scattered read', 'db sequential real', 'enqueue'?
What is a production dba?
What is the dba role in oracle?
using hot backup without being in archive log mode, can you recover in the event of a failure? Why or why not?
What is the advantage of using rman?
Which function is used to find the largest integer less than or equal to aspecific value?
You look at the dba_rollback_segs view and see that you have a large number of wraps is this a problem?
How long does it take to learn database administration?
You see multiple extents in the temporary tablespace. Is this a problem?
How can you tell if a tablespace has excessive fragmentation?