[TYPO3-dev] mysql/mysqli and prepared statements

Ernesto Baschny [cron IT] ernst at cron-it.de
Mon Oct 8 20:12:17 CEST 2007


Martin Kutschker wrote: on 08.10.2007 09:35:

>>>> Note: since we use the unix timestamp the MySQL
>>>> query cache for SQL's we execute is valid for one
>>>> second anyways. Wasn't there a patch underway for this?
>>> I don't get what you're hinting at.
>>
>> See t3lib_pageSelect::enableFields():
>>
>> SELECT * FROM tt_content WHERE 1=1 AND
>> starttime<=$GLOBALS['SIM_EXEC_TIME']
>>
>> Such a query will be different every(!) second. I never tested it but it
>> appears logical that this will make it impossible to use the query cache
>> for stuff like that...
> 
> We could force SIM_EXEC_TIME to start at second 0 of a minute. So there
> is a query for a *gasp* whole minute :-)

See dmc_highPerformance extension which does kind of that (doesn't touch
SIM_EXEC_TIME, but rounds to the nearest 30-secs in many common places)
 for that exact reason (to make better use of MySQL query cache). Also
see article about it in latest T3N magazine.

Cheers,
Ernesto




More information about the TYPO3-dev mailing list