slow query
-
Hello
i have slow query appears in pages as from core (i use query monitor)
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
LEFT JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
LEFT JOIN wp_term_relationships AS tt1
ON (wp_posts.ID = tt1.object_id)
WHERE 1=1
AND wp_posts.ID NOT IN (37193)
AND ( wp_term_relationships.term_taxonomy_id IN (31)
AND tt1.term_taxonomy_id IN (66790,66791) )
AND wp_posts.post_type = ‘job_listing’
AND ((wp_posts.post_status = ‘publish’))
ORDER BY RAND()
LIMIT 0, 6———————
and that slow query in home page
SELECT wp_posts.ID
FROM wp_posts
LEFT JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
WHERE 1=1
AND ( wp_term_relationships.term_taxonomy_id IN (33) )
AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘job_listing’)
AND ((wp_posts.post_status = ‘publish’))
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date DESChow can i fix them?
- The topic ‘slow query’ is closed to new replies.