Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#8977 closed defect (bug) (fixed)

Database schema upgrades can be inefficient with lots of database tables because of maybe_create_table() function

Reported by: jamescollins's profile jamescollins Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7
Component: Upgrade/Install Keywords:
Focuses: Cc:


The maybe_create_table() function in wp-admin/includes/upgrade.php performs a SHOW TABLES query (which returns every table in the database) then loops over all of these to see if a the specified table exists.

WPMU was recently modified to optimise this, and donncha has suggested that this fix be implemented in WP as well.

(See WPMU Trac Ticket #833 for more information)

Attachments (1)

maybe_create_table.diff (814 bytes) - added by jamescollins 15 years ago.
Patch against r10446

Download all attachments as: .zip

Change History (2)

15 years ago

Patch against r10446

#1 @ryan
15 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [10447]) Optimize maybe_create_table(). Props jamescollins. fixes #8977

Note: See TracTickets for help on using tickets.