[wp-trac] [WordPress Trac] #62790: "autoload" index is not used

WordPress Trac noreply at wordpress.org
Fri Feb 21 19:21:56 UTC 2025


#62790: "autoload" index is not used
--------------------------+--------------------------
 Reporter:  kkmuffme      |       Owner:  joemcgill
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  6.8
Component:  Database      |     Version:  5.3
 Severity:  minor         |  Resolution:
 Keywords:  needs-patch   |     Focuses:  performance
--------------------------+--------------------------
Changes (by joemcgill):

 * keywords:   => needs-patch


Comment:

 Thanks for raising this @kkmuffme. I can confirm that the current index
 does not seem to be used.


 > Optionally the index can be forced...


 I've tested this approach with the following query on a default install:

 {{{
 EXPLAIN SELECT option_name, option_value
 FROM wp_options
 FORCE INDEX (autoload)
 WHERE autoload IN ( 'yes', 'on', 'auto-on', 'auto' )
 }}}


 > However I couldn't see a performance gain by forcing the index either.


 I can confirm that this forces the index to be used, and results in fewer
 rows to queried. In a default install the difference is very slight, but
 on a larger DB with many options, this may still provide the previous
 benefit.

 There were a lot of tests done on the approach in #24044 prior to creating
 the index, so it would be useful to get some similar data now on whether
 trying to update the index in a way that will allow it to be used is worth
 pursuing.

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


More information about the wp-trac mailing list