I have another issue. For better overview, this is my table and indexes
https://docs.google.com/file/d/0BzH_1T4FBZ5SbmI4cHZSaENhOHc/edit?usp=sharing
After adding this index (status_modifiedgmt) another query
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
WHERE 1 =1
AND wp_posts.post_type = 'post'
AND (
wp_posts.post_status = 'publish'
)
ORDER BY wp_posts.post_date DESC
LIMIT 0 , 9
which is supposed to use type_status_date index, stops using it and starts using status_modifiedgmt, which makes it do filesort.
How can I force this query to use type_status_date index. I don't have acces put FORCE INDEX in php code.
Edited 1 time(s). Last edit at 05/17/2013 03:53AM by Jan Kowalski.