Hi!

>>>>> "Sinisa" == Sinisa Milivojevic <[EMAIL PROTECTED]> writes:

Sinisa> BAUMEISTER Alexandre writes:
>> Bonjour,
>> 
>> With  3.22  I  used to do some queries like "DELETE FROM TABLE". And
>> this was very rapid as Mysql only deletes and re-create the files.
>> 
>> I  knew  that  DELETE  was  very  long with InnoDB because it has to
>> clear all the table space used by the table from which you DELETE.
>> 
>> But I'm surprised to see that it's very long with MyISAM too !

This happens if you are using MySQL-Max and has Innodb activated.

This is fixed in MySQL 4.0

>> When   I   do   a  "DELETE  FROM TABLE" (without any where) on a big
>> table,  it  takes  many  minutes.  And if I look at the table files,
>> while the table is empty, the files are still very big.
>> 
>> The only way to reduce space used by the table is OPTIMIZE.
>> 
>> Is this normal ? Is this a difference between ISAM an MyISAM ? I saw
>> no notice about that in the documentation ...
>> 
>> Regards,
>> Alex.


Sinisa> Have you tried TRUNCATE command ??

Unfortunately this will not help in MySQL 3.23 as this is internally
changed to DELETE FROM TABLE.

In MySQL 4.0 TRUNCATE doesn't have this problem and should always be fast.

Regards,
Monty

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to