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

WordPress Trac noreply at wordpress.org
Thu Aug 17 00:10:51 UTC 2023


#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 galbaras):

 An additional index means slower updates and slightly slower queries that
 don't use the index (more decisions to make on the best query plan). On
 sites that update meta data a lot, or sites that don't use this index
 much, this may not be of benefit.

 Also, as I've mentioned, the index can be created in 2 ways, and this will
 yield different results - one may help more and one may hinder more. It
 really depends on the context.

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


More information about the wp-trac mailing list