[wp-hackers] siteurl option queried from database on every load

Mark Jaquith mark.wordpress at txfx.net
Sun Jan 15 13:36:20 GMT 2006


The siteurl option is queried individually on every page load:

     [0] => Array
         (
             [0] => SELECT option_value FROM wp_options WHERE  
option_name = 'siteurl'
             [1] => 0.0012500286102295
         )

It is line 124 in wp-settings.php:

$db_check = $wpdb->get_var("SELECT option_value FROM $wpdb->options  
WHERE option_name = 'siteurl'");

The options cache is up and running at this point... but the wp- 
include files haven't been uploaded... so get_option() is  
unavailable.  Can we move this check to a later point, so that the  
option can be grabbed the the cache with get_option()?  Looks to me  
like an easy way to trim one query from every page load... every  
little bit helps!

--
Mark Jaquith
http://txfx.net/




More information about the wp-hackers mailing list