[TYPO3-dev] Questions about exec_PREPAREquery

Xavier Perseguers xavier at typo3.org
Mon Jun 6 22:37:35 CEST 2011


Hello Stefan,

> thank you for your help. I just have a little bit time for testing. I
> have prgrammed a little speedtesting extension using a bad old way, the
> new prepared statement of TYPO3 and the original prepared statements
> made by MySQL:
>
> http://typo3.sfroemken.de/fileadmin/templates/downloads/T3X_sfpreparespeedtest-0_0_0-z-201106062018.t3x
>
>
> After installing and insertion as plugin I can see following timings on
> my system:
> The old way: 58ms
> TYPO3-Stmt: 49ms
> MySQL-Stmt: 42ms

I confirm those numbers, on my laptop I get 21/17/13.

> I'm wondering that TYPO3-Statements are faster than the old way
> allthough TYPO3-Statements are using the same functions like the old
> way. And it has to load an additional class.
>
> I don't understand this?!?! Why is it faster?

That's a really good question actually! Even if you used hints to 
prevent caching from MySQL, you may try to move that into 3 different 
(sub-)methods and change the order to make sure one loop does not 
influence the other.

Interesting! Some investigation has to be done.

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org





More information about the TYPO3-dev mailing list