Difference between truncate and delete

Source: Internet
Author: User
1. Delete generates rollback. If a table with a large data volume is deleted, it takes up a lot of rollback segments. truncate is a DDL operation and does not generate rollback, which is faster.



Truncate table does not generate rollback information and redo records so it is much faster than Delete.



In default, it deallocates all space within t the space allocated by minextents unless you specify reuse storage clause.



2. Do not free up space from tablespace.



Alter tablespace AAA coalesce; space available



3. After truncate adjusts high water mark and delete does not. truncate, The hwm of table is returned to the positions of initial and next (default)



Delete is not allowed.



4. truncate can only



Delete can be table, view, and synonym.



5. The truncate table object must be in this mode, or have the permission to drop any table. The delete object must be in this mode, or be authorized to delete on schema. table or delete any table Permissions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.