[TYPO3-dev] mysql/mysqli and prepared statements

ries van Twisk typo3 at rvt.dds.nl
Mon Oct 8 20:31:30 CEST 2007


On Oct 8, 2007, at 1:19 PM, Martin Kutschker wrote:

> Ernesto Baschny [cron IT] schrieb:
>> 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.
>
> Then my impromptu suggestion wasn't so far fetched :-)
>
> Masi


Would it be save to start rounding $GLOBALS['SIM_EXEC_TIME'] so it's  
globally??

Also to be honest, this will affect only sites that needs high  
performance (multiple
hit's per seconds. But it will help to get resources down a bit
for servers that are hit less frequently, less then one time per  
second..

Ries











More information about the TYPO3-dev mailing list