[wp-trac] [WordPress Trac] #24498: Improving performance of meta_form()

WordPress Trac noreply at wordpress.org
Wed Jun 5 13:57:17 UTC 2013


#24498: Improving performance of meta_form()
-------------------------+-----------------------------
 Reporter:  lumaraf      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Performance  |    Version:  3.5.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 The query executed in meta_form() in wp-admin/includes/template.php took
 over 5 seconds to execute on my largest wordpress installation. I changed
 it to use a NOT BETWEEN to enable MySQL to execute the query by just using
 a small part of the meta_key index. My new query executes in less than 10
 milliseconds.

 Here is the improved query:
 SELECT DISTINCT meta_key FROM wp_postmeta
 WHERE meta_key NOT BETWEEN '_' AND '_z'
 HAVING meta_key NOT LIKE '\_%'
 ORDER BY meta_key

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24498>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list