[TYPO3-dev] How standard compliant is "truncate"?

Marcus Krause marcus#exp2009 at t3sec.info
Thu Feb 5 16:34:16 CET 2009


Steffen Kamper schrieb am 02/05/2009 12:35 PM Uhr:
> Hi,
> 
> Martin Kutschker schrieb:
>>
>> Is truncate really faster?  I assumed that a DELETE without a WHERE
>> clause will work internally the same as a TRUNCATE.
>>
> 
> for sure. We had some clients where clear cache lead to server crash.
> Truncate does the job in less a minute there. (MySQL)

The reason why:

Indexes

AFAIK, truncate doesn't care about indexes, it removes all rows in an
"atomic operation". A delete will rebuild indexes after each removed row.



Marcus.




More information about the TYPO3-dev mailing list