Slow queries after changing theme
-
Hello,
my site was running very well and then i changed my site theme to a mobile-friendly Paid theme and then came WP update 4.2.1,
Now every thing is cool but i am getting slow queries when a user search on site, before updating to WP 4.2.2 i was getting slow queries every minute, but after updating to WP 4.2.2 frequency of slow queries is decreased to 4 to 5 queries a day. here is what i got in slow.log# Time: 150707 9:57:20 # User@Host: example[example] @ localhost [] Id: 831 # Query_time: 1.050396 Lock_time: 0.000256 Rows_sent: 24 Rows_examined: 31206 SET timestamp=1436245040; SELECT SQL_CALC_FOUND_ROWS example_posts.ID FROM example_posts WHERE 1=1 AND (((example_posts.post_title LIKE '%host%') OR (example_posts.post_content LIKE '%host%'))) AND (example_posts.post_password = '') AND example_posts.post_type IN ('post', 'page', 'attachment') AND (example_posts.post_status = 'publish') ORDER BY (CASE WHEN example_posts.post_title LIKE '%the host%' THEN 1 WHEN example_posts.post_title LIKE '%host%' THEN 2 WHEN example_posts.post_content LIKE '%the host%' THEN 4 ELSE 5 END), example_posts.post_date DESC LIMIT 8760, 24;
DB size of my site is around 60MB
Mysql query cache and xcache is enabled for caching db queries, i have tried disabling both but problem was not resolved, i have tried using a Custom Function to Search only Post Titles and it is working well with 0 slow queries but i want to enable user to search both post title and content.
Any help will be appreciated.
Thanks
- The topic ‘Slow queries after changing theme’ is closed to new replies.