[TYPO3-dev] Questions about exec_PREPAREquery
Stefan Frömken
firma at sfroemken.de
Mon Jun 6 20:55:29 CEST 2011
Hello Xavier,
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'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?
Stefan
Am 23.05.2011 07:49, schrieb Xavier Perseguers:
> Hello Stefan,
>
>> is there someone who can explain me a little bit about the new function
>> exec_PREPAREDquery?
>>
>> Is it faster? Does it use caching? Performance?
>
> At the moment, it is faster when you use DBAL, aka not a MySQL database.
>
>> Is it only an optimization of SQL_Queries? (not faster, but a better
>> style in code)
>
> Definitively!
>
>> Is it the first step to include mysqli_prepare to TYPO3 in future?
>
> This would be the idea, yes.
>
>> In short: When or why should I use this function?
>
> Whenever you can!
>
> Regards
>
More information about the TYPO3-dev
mailing list