[wp-trac] [WordPress Trac] #14397: slow sql query from probably is_blog_installed

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 8 03:28:34 UTC 2010


#14397: slow sql query from probably is_blog_installed
--------------------------+-------------------------------------------------
 Reporter:  mark-k        |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Performance   |     Version:  3.0            
 Severity:  normal        |    Keywords:  has-patch      
--------------------------+-------------------------------------------------

Comment(by nacin):

 Replying to [comment:4 jimmcq]:
 > In my tests with a large number of blogs, "SHOW TABLES LIKE
 '{$blog_prefix}%'" was still pretty slow (30 seconds as opposed to 2
 minutes for a generic "SHOW TABLES")

 We could probably leverage wpdb::base_prefix here.

 Not sure how much faster the LIKE would really be, though. In
 is_blog_installed(), chances are we're going to die because wpdb::site
 doesn'r exist, right? Maybe we can make that a much more direct query for
 global tables, before we look for blog-level tables.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14397#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list