I’ve checked searching with Query Monitor plugin. Here is SQL Query ( https://website.com/?s=viofo ) that is super slow (19 seconds this time):
SELECT SQL_CALC_FOUND_ROWS 75b_posts.ID
FROM 75b_posts
WHERE 1=1
AND (((75b_posts.post_title LIKE '%viofo%')
OR (75b_posts.post_excerpt LIKE '%viofo%')
OR (75b_posts.post_content LIKE '%viofo%')))
AND 75b_posts.post_type IN ('post', 'page', 'attachment')
AND (75b_posts.post_status = 'publish'
OR 75b_posts.post_author = 1
AND 75b_posts.post_status = 'private')
ORDER BY 75b_posts.post_title LIKE '%viofo%' DESC, 75b_posts.post_date DESC
LIMIT 0, 10
This is the caller:
WP_Query->get_posts()
Main Query
Screenshot:
View post on imgur.com
Here is another query, but it’s faster (1 second):
SELECT 75b_posts.*
FROM 75b_posts
WHERE 1=1
AND 75b_posts.ID IN (19327,13600,19324,330444,283013,330413,587881,610705,628185,628183,639260,1150866,1280541,1380663,1536242,2141749,4102953,4881216,4885577,4882266,4881347,4882005,4883739,4883740,5010699,5081700,5081697,5224840,5623788,5692541,5777727,5804331,5834759,5896805,6030583,6660368,6592214,6660365)
AND 75b_posts.post_type = 'post'
AND ((75b_posts.post_status = 'publish'))
ORDER BY 75b_posts.post_date DESC
Screenshot:
View post on imgur.com
Do you have any idea what to do to improve speed of searching and posting/updating?