[TYPO3-core] RFC: Bug #13508: Use exec_TRUNCATETABLEquery() instead of DELETE FROM throughout the core

Dmitry Dulepov dmitry.dulepov+t3ml at gmail.com
Thu Feb 11 11:47:03 CET 2010


On 2010-02-11 12:39:33 +0200, Martin Kutschker said:
> But there is one significant difference. DELETE removes each row and 
> will therefore fire row
> triggers. TRUNCATE doesn't do that. So if you use triggers it's not 
> only a matter of speed, it's a
> trade-off between speed and integrity.

Yes, I thought of that and of auto_increment differencies. We do not 
use triggers in TYPO3 at the moment (SQL parse does not support them 
anyway) and deletion of the whole table happens only for cache tables. 
So both these differences should not play a major role.

May be we should write this all in function's phpdoc comments? If we 
ever decide to use triggers, we always can rethink the decision. But 
for now we do not have a problem I think.

-- 
Dmitry Dulepov
TYPO3 expert / TYPO3 core team member / TYPO3 security team member 
Read more @ http://dmitry-dulepov.com/



More information about the TYPO3-team-core mailing list