SQL query hanging php

Question

I’m having issues with a fairly large WordPress site creating 45+ php-fpm pools. My hosting company says it is some long running SQL queries causing the problem and gave me this:

+-----+------------------------+-----------+------------------------+---------+------+------------+------------------------------------------------------------------------------------------------------+----------+
| Id  | User                   | Host      | db                     | Command | Time | State      | Info                                                                                                 | Progress |
+-----+------------------------+-----------+------------------------+---------+------+------------+------------------------------------------------------------------------------------------------------+----------+
| 3   | discovermuscatin_newdm | localhost | discovermuscatin_newdm | Query   | 1072 | statistics | SELECT SQL_CALC_FOUND_ROWS DISTINCT nm_posts.ID FROM nm_posts  INNER JOIN nm_postmeta ON ( nm_posts. | 0.000    |
| 69  | discovermuscatin_newdm | localhost | discovermuscatin_newdm | Query   | 902  | statistics | SELECT SQL_CALC_FOUND_ROWS DISTINCT nm_posts.ID FROM nm_posts  INNER JOIN nm_postmeta ON ( nm_posts. | 0.000    |

So I went into PHPmyAdmin to check this and got this:

id  select_type     table   type    possible_keys   key     key_len     ref     rows    Extra   
1   SIMPLE  nm_postmeta     ALL     NULL    NULL    NULL    NULL    195529  

id  select_type     table   type    possible_keys   key     key_len     ref     rows    Extra   
1   SIMPLE  nm_posts    ALL     NULL    NULL    NULL    NULL    8026 

From what I’ve read this may be a key issue, but I have no idea. Not a developer, just a good troubleshooter. Need to be able to understand what’s going on to either fix myself or tell a developer what the problem is.

0
, , , Chris Anderson 4 years 2020-02-09T08:38:27-05:00 0 Answers 54 views 0

Leave an answer

Browse
Browse