[TYPO3-dev] Optimizing last 20 query

John Angel johnange at gmail.com
Fri Mar 16 21:11:03 CET 2007


Cannot get rid of "Using filesort" not even for this:

ALTER TABLE pages ADD INDEX `excerpts` ( pid,crdate);

EXPLAIN SELECT SQL_NO_CACHE pages.crdate, pages.title
FROM pages
WHERE pages.pid
IN ( 1000,1010 )
ORDER BY pages.crdate DESC


http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html
The index can be used ... as long as all of the unused portions of the 
index ... are constants in the WHERE clause...

Is that it?






More information about the TYPO3-dev mailing list