Which statement is true about TRUNCATE and DELETE?
A.
For large tables TRUNCATE is faster than DELETE.
B.
For tables with multiple indexes and triggers is faster than TRUNCATE.
C.
You can never TRUNCATE a table if foreign key constraints will be violated.
D.
You can never tows from a table if foreign key constraints will be violated.
The Answer Is:
A
This question includes an explanation.
Explanation:
A: True. TRUNCATE is generally faster than DELETE for removing all rows from a table because TRUNCATE is a DDL (Data Definition Language) operation that minimally logs the action and does not generate rollback information. TRUNCATE drops and re-creates the table, which is much quicker than deleting rows one by one as DELETE does, especially for large tables. Also, TRUNCATE does not fire triggers.
References:
Oracle documentation specifies that TRUNCATE is faster because it doesn't generate redo logs for each row as DELETE would.
TRUNCATE cannot be rolled back once executed, since it is a DDL command and does not generate rollback information as DML commands do.
1z0-071 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 60% Discount on All Products,
Use Coupon: "8w52ceb345"