List:General Discussion« Previous MessageNext Message »
From:Heikki Tuuri Date:December 6 2004 11:05pm
Subject:Re: innodb: TRUNCATE vs. DELETE FROM
View as plain text  
Paul,

----- Original Message ----- 
From: "Paul Mallach" <pm@stripped>
Newsgroups: mailing.database.myodbc
Sent: Monday, December 06, 2004 4:26 PM
Subject: innodb: TRUNCATE vs. DELETE FROM


> Hi!
>
> Is TRUNCATE optimized for innodb tables in MySQL 4.1.7?
>
> http://dev.mysql.com/doc/mysql/en/TRUNCATE.html says:
> "For InnoDB, TRUNCATE TABLE is mapped to DELETE, so there is no 
> difference.".
>
> But http://dev.mysql.com/doc/mysql/en/InnoDB_tuning.html claims:
> "Beware also of other big disk-bound operations. Use DROP TABLE or 
> TRUNCATE
> TABLE (from MySQL 4.0 up) to empty a table, not DELETE FROM tbl_name."

thank you for pointing out this error. TRUNCATE is still mapped to DELETE 
FROM ... in 5.0. I have now corrected the online manual.

> bye, Paul.
>
> -- 
> Paul Mallach
> ARIVA.DE AG
> Ostseekai 2
> D - 24103 Kiel
>
> Tel: +49 (0)431/97108-24               E-Mail: pm@stripped
> Fax: +49 (0)431/97108-29               Internet: http://www.ariva.de

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM 
tables
http://www.innodb.com/order.php

Thread
innodb: TRUNCATE vs. DELETE FROMPaul Mallach6 Dec
Re: innodb: TRUNCATE vs. DELETE FROMHeikki Tuuri7 Dec