I have a big multisite network (over 12,000 sites), so there are a lot of tables in the database.
SHOW TABLES LIKE queries are pretty slow since they hit the information_schema. We use OptionTree in one of our themes, and any admin request on that theme makes a SHOW TABLES LIKE call because the maybe_cleanup() function is hooked to admin_menu.
Is there any way we can limit the number of times this is called? Perhaps just run the cleanup once at theme or plugin activation?
I have a big multisite network (over 12,000 sites), so there are a lot of tables in the database.
SHOW TABLES LIKE
queries are pretty slow since they hit theinformation_schema
. We use OptionTree in one of our themes, and any admin request on that theme makes aSHOW TABLES LIKE
call because themaybe_cleanup()
function is hooked toadmin_menu
.Is there any way we can limit the number of times this is called? Perhaps just run the cleanup once at theme or plugin activation?