hello,
I have about 3 million rows in postmeta and 60 thousands rows in posts.
when i checked for slow queries mysql, i notice that the core function meta_form() in wp-admin/include/template.php is taking about 6-7 seconds.
Original query:
SELECT meta_key
FROM wp_postmeta
GROUP BY meta_key
HAVING meta_key NOT LIKE '\_%'
ORDER BY meta_key
LIMIT 30;
I did some digging and I found a nice query to replace it:
SELECT DISTINCT meta_key
FROM wp_postmeta
WHERE meta_key NOT BETWEEN '_' AND '_z'
HAVING meta_key NOT LIKE '\_%';
how can i do it in my theme or somewhere without changing the core?
(no hook is available for that... as for i know...)
thanks