我有一个多站点安装,但我遇到了性能问题,因为查询太多了。当我检查查询时,我发现每个博客都有查询。它不会满足我正在加载的东西。
[141] => Array
(
[0] => SELECT * FROM wp_blogs WHERE blog_id = 61 /* get_blog_details */
[1] => 0.0010240077972412
[2] => require('path-to-root\wp-blog-header.php'), require_once('path-to-root\wp-includes\template-loader.php'), do_action('template_redirect'), call_user_func_array, _wp_admin_bar_init, WP_Admin_Bar->initialize, get_blogs_of_user, get_blog_details
)
[142] => Array
(
[0] => SELECT option_name, option_value FROM wp_61_options WHERE autoload = 'yes'
[1] => 0.0028109550476074
[2] => require('path-to-root\wp-blog-header.php'), require_once('path-to-root\wp-includes\template-loader.php'), do_action('template_redirect'), call_user_func_array, _wp_admin_bar_init, WP_Admin_Bar->initialize, get_blogs_of_user, get_blog_details, switch_to_blog, WP_Roles->reinit, get_option, wp_load_alloptions
)
每个博客都有查询。
你知道如何制止它们吗?