get_option creates many DB queries per request / trac ticket 1550
-
Hi,
i was doing some performance analysis with the Xdebug and Xhprof profiling tools and noticed that many of my DB queries/per request are something similar to:
SELECT option_value FROM wp_options WHERE option_name = '_bbp_enable_subscriptions' LIMIT 1
In Trac Ticket 1550 it is mentioned, that the WordPress Object Cache is used, but this “error_log” (in wp-db.php Version 4.4.1 line 1809) tells me a different story:
private function _do_query( $query ) { if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { $this->timer_start(); } if ( $this->use_mysqli ) { error_log($query . "\n", 3, '/tmp/wpdb.log'); $this->result = @mysqli_query( $this->dbh, $query ); } else { $this->result = @mysql_query( $query, $this->dbh ); } $this->num_queries++; if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) { $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() ); } }
Am i missing some Cache Settings here?
I am using WordPress 4.4.1 with bbPress 2.5.8
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.