Pretty slow query
-
Hello, I’ve been doing some maintenance jobs on the server and I’ve checked what mariadb has to say about the queries that are being run by WordPress and I’ve found that one:
# Query_time: 1.928526 Lock_time: 0.000064 Rows_sent: 50 Rows_examined: 438401
SELECT
p.ID,p.post_type,p.post_content,p.post_excerpt,p.post_modified_gmt
FROM wp_posts as p
LEFT JOIN wp_aioseo_posts as ap ONap.post_id=p.ID
WHERE 1 = 1 AND
(ap.idIS NULL ORp.post_modified_gmt>ap.video_scan_dateORap.image_scan_dateIS NULL )
ANDp.post_status= ‘publish’
ANDp.post_typeIN ( ‘post’, ‘page’, ‘attachment’, ‘forum’, ‘topic’, ‘reply’, ‘reklamy’, ‘reklamy2’ )
LIMIT 50;If that query is populating the aioseo_posts table, then would you be so kind and add “order by p.ID” or something like that to that query? Right now it’s in the top10 by the pt-query-digest.
The topic ‘Pretty slow query’ is closed to new replies.