Truncate table requires the drop table permission, which completely clears a table. Logically, the truncate table is the same as the delete table, or the drop table + create table is the same. Using truncate table to delete full table data is faster than deleting. The truncate table is used to clear data. rollback is not allowed and is not restricted by the foreign key constraints between tables. Truncate is a DDL statement and delete is a DML statement. The differences between the two are as follows: 1. truncate is a mail drop table + create table, which is much faster than deleting a row of data using Delete, especially clearing Big Data Tables. 2. truncate is a type of implicit commit, so rollback is not allowed. 3. If the current table has foreign key constraints, the truncate table can clear all data in the table, without the foreign key constraints. 4. Use truncate table to set the auto-increment ID to zero, and delete will not. 5. When a partition table is used, the table is truncated to save the partition. That is, the data and index files are deleted and re-created, and the partition definition (. Par) files are not affected. 6. The truncate TABLE statement does not call the delete trigger.
Refer:
Http://dev.mysql.com/doc/refman/5.7/en/truncate-table.htmlhttp://dev.mysql.com/doc/refman/5.6/en/optimizing-innodb-ddl-operations.html
Difference between truncate table and delete