Alex,
DELETE FROM yourtable
now deletes individually each row when InnoDB is enabled,
also for MyISAM tables. For InnoDB the reason is that a
consistent read may come to read the table: dropping the
table and recreating it is not acceptable if we want a
consistent read to the table. I think Monty did not want to
change the code, and therefore it is the same for MyISAM if
InnoDB is enabled.
In 4.0 the TRUNCATE command will empty the table quickly
by dropping and recreating the table, both for InnoDB and
MyISAM tables.
Regards,
Heikki
>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 !
>>
>> 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.
>
>
>Have you tried TRUNCATE command ??
>
>--
>Regards,
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
>/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
> <___/ www.mysql.com
>
>
>---------------------------------------------------------------------------
-----
>
>
---------------------------------------------------------------------
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