MySQL Forums
Forum List  »  Optimizer & Parser

Query optimization
Posted by: Jan Kowalski
Date: May 10, 2013 05:35AM

I have such query:

SELECT post_modified_gmt
FROM wp_posts
WHERE post_status = 'publish'
AND post_type
IN (
'post', 'page', 'attachment', 'topic'
)
ORDER BY post_date DESC
LIMIT 1

there is composite index on post_type,post_status,post_date columns but mysql uses filesort which dramaticly slows down this query execution. Is there any way to speed up this query?

Options: ReplyQuote


Subject
Views
Written By
Posted
Query optimization
2995
May 10, 2013 05:35AM
1450
May 12, 2013 08:42PM
1421
May 15, 2013 06:45AM
1429
May 15, 2013 08:35AM
1544
May 16, 2013 08:18AM
1492
May 17, 2013 03:52AM
1418
May 17, 2013 11:47PM
1321
May 21, 2013 08:51AM
1479
May 22, 2013 08:08AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.