[wpmu-trac] [WordPress MU Trac] #976: wp_load_alloptions ignores autoload

WordPress MU Trac wpmu-trac at lists.automattic.com
Thu Apr 30 16:22:02 GMT 2009


#976: wp_load_alloptions ignores autoload
--------------------------+-------------------------------------------------
 Reporter:  re5et         |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:          
Component:  Optimisation  |     Version:          
 Severity:  normal        |    Keywords:          
--------------------------+-------------------------------------------------
 In wpmu (not wp) the wp_load_alloptions function ignores autoload when
 selecting. This leads to massive waste. At the moment this query is
 returning over 1mb each time for me, very little of which is actually
 used. Since this has been implemented (2.2 i think) the amount of data
 getting pulled out of my database has tripled.

 the block right now is like:
 {{{
 $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value
 FROM $wpdb->options FORCE INDEX(PRIMARY) ORDER BY option_id ASC" );
 }}}

 where in wordpress it is like:
 {{{
 if ( !$alloptions_db = $wpdb->get_results( "SELECT option_name,
 option_value FROM $wpdb->options WHERE autoload = 'yes'" ) )
     $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value
 FROM $wpdb->options" );
 }}}

 Is there any reason that this ignores autoload in wpmu, or is this an
 oversight?

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/976>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list