[wp-trac] [WordPress Trac] #24044: Add index to wp_options to aid/improve performance

WordPress Trac noreply at wordpress.org
Wed Sep 2 19:41:49 UTC 2015


#24044: Add index to wp_options to aid/improve performance
--------------------------------+--------------------------
 Reporter:  DanBUK              |       Owner:
     Type:  enhancement         |      Status:  reopened
 Priority:  normal              |   Milestone:
Component:  Options, Meta APIs  |     Version:
 Severity:  major               |  Resolution:
 Keywords:  has-patch           |     Focuses:  performance
--------------------------------+--------------------------
Changes (by francogilio):

 * severity:  normal => major


Comment:

 Here are some results from a test some months old:



 {{{
 SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';
 628 rows in set (2.24 sec)
 628 rows in set (2.24 sec)
 628 rows in set (2.23 sec)
 }}}


 ----

 {{{

 CREATE INDEX autoload ON wp_options(autoload, option_name);
 SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes';
 628 rows in set (0.01 sec)
 628 rows in set (0.01 sec)
 628 rows in set (0.00 sec)
 }}}


 As you can see, the difference is huge. I may roll out a local copy of
 this site to do some test, if it helps.

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


More information about the wp-trac mailing list