[TYPO3-dev] mysql/mysqli and prepared statements

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon Oct 8 21:29:15 CEST 2007


ries van Twisk schrieb:
> 
> 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??

Is SIM_EXEC_TIME used for anything than time based access control? If 
not rounding could be good enough.

Masi




More information about the TYPO3-dev mailing list