[TYPO3-dev] rfc: minor db change for TS templates
Dmitry Dulepov
typo3 at accio.lv
Thu Sep 7 08:33:50 CEST 2006
Hi!
Martin Kutschker wrote:
> SELECT * FROM sys_template WHERE pid=1 AND deleted=0 AND hidden=0 AND
> (starttime<=1157534861) AND (endtime=0 OR endtime>1157534861) ORDER BY
> sorting LIMIT 1;
...
> Not much, but a filesort is avoided.
Anyway, it is better than current. Since you already started it, what
happens if you put index like this:
KEY parent3 (pid,deleted,hidden,starttime,endtime,sorting)
Not a small key and I am not sure that MySQL will really consider it
(there is a limit for key after which mysql does not use it). But i it
does, it make perform all query using this index.
--
Dmitry Dulepov
http://typo3bloke.net/
"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)
More information about the TYPO3-dev
mailing list