Wednesday, December 14, 2011

cPanel + mysql slow queries to TABLE_SCHEMA

If you are seeing the following in mysqladmin proc for a long time then its basically cPanel calculating account disk usage from the information_schema, this tends to increase the load on some servers.



| 14436 | root           | localhost | mysql          | Query          | 2227 |                    | SELECT TABLE_SCHEMA as DB,SUM(DATA_LENGTH)+SUM(INDEX_LEN
GTH) AS SPACEUSED from information_schema.ta |

You can place the following in your cpanel conifg (/var/cpanel/cpanel.config) to force /scripts/update_db_cache to utilize a `du` style disk calculation. This should help you.

use_information_schema=0

restart cpanel once done :)