-
Hi!
After upgrading my database to Mysql 8 my server became 100% loaded and no way to reduce the load.
Server support told me that your plugin creates a lot of queries to the database.
Here is the data they sent me.
===============================
| 3453 | website_co | localhost | website_com | Query | 159 | executing | SELECT COUNT( DISTINCT p.ID ) as count FROM wp_posts as p
LEFT JOIN wp_postmeta AS pm ON ( p.ID = pm.post_id AND pm.meta_key = ‘rank_math_robots’ )
WHERE (
( pm.meta_key = ‘rank_math_robots’ AND pm.meta_value NOT LIKE ‘%noindex%’ ) OR
pm.post_id IS NULL
)
AND p.post_type = ( ‘product’ ) AND p.post_status = ‘publish’
==============================================================
mysql> explain SELECT COUNT( DISTINCT p.ID ) as count FROM wp_posts as p LEFT JOIN wp_postmeta AS pm ON ( p.ID = pm.post_id AND pm.meta_key = ‘rank_math_robots’ ) WHERE (( pm.meta_key = ‘rank_math_robots’ AND pm.meta_value NOT LIKE ‘%noindex%’ ) OR pm.post_id IS NULL) AND p.post_type = ( ‘product’ ) AND p.post_status = ‘publish’;
+—-+————-+——-+————+——+——————+——————+———+———————–+——–+———-+————-+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
+—-+————-+——-+————+——+——————+——————+———+———————–+——–+———-+————-+
| 1 | SIMPLE | p | NULL | ref | type_status_date | type_status_date | 164 | const,const | 110352 | 100.00 | Using index |
| 1 | SIMPLE | pm | NULL | ref | post_id,meta_key | post_id | 8 | website_com.p.ID | 42 | 0.12 | Using where |
+—-+————-+——-+————+——+——————+——————+———+———————–+——–+———-+————-+
2 rows in set, 1 warning (0.01 sec)
=====================================Help me solve the problem please.
My server is down right now because of this error.
Regards Denis.
The ticket ‘After upgrading to mysql 8. Rank Math is loading the site.’ is closed to new replies.