Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#26419 closed enhancement (duplicate)

maybe_create_table is very resource intensive

Reported by: codix's profile codix Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.0
Component: Database Keywords:
Focuses: Cc:

Description

SHOW TABLES is a very resource intensive query, specially in multi site setup where there will be many tables in a given database. It's worse when you run through all the tables in the database to see whether the table exists.

Instead I propose SHOW TABLES LIKE which will achive the same thing much more effiently.

Attachments (1)

patch.diff (1.2 KB) - added by codix 10 years ago.

Download all attachments as: .zip

Change History (3)

@codix
10 years ago

#1 @nacin
10 years ago

maybe_create_table() isn't something WordPress core uses, and should possibly be deprecated along with maybe_add_column(), maybe_drop_column(), and install-helper.php; in favor of dbDelta(). These functions all date to WordPress 1.0 and were more or less replaced by dbDelta() in WordPress 1.5. So we're talking 9 years ago.

#2 @SergeyBiryukov
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from trunk to 1.0

Duplicate of #14273.

Note: See TracTickets for help on using tickets.