[wp-trac] [WordPress Trac] #45354: Adding index for meta_key and post_id in postmeta

WordPress Trac noreply at wordpress.org
Thu Nov 15 13:19:35 UTC 2018


#45354: Adding index for meta_key and post_id in postmeta
----------------------------------------+------------------------------
 Reporter:  DuckDagobert                |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Database                    |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-testing dev-feedback  |     Focuses:  performance
----------------------------------------+------------------------------

Comment (by DuckDagobert):

 No, my code is the fix/patch for the problem.

 For query example take the loop query (which gets post_id and _visibility
 for example).
 But most WP core but also plugin queries like woocommerce,... will profit
 immensely from this index, as they select post_id inner join on postmeta
 where meta_key

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45354#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list