Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#26419 closed enhancement (duplicate)

maybe_create_table is very resource intensive

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

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 13 years ago.

Download all attachments as: .zip

Change History (3)

@codix
13 years ago

#1 @nacin
13 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
13 years ago

  • Milestone Awaiting Review
  • Resolutionduplicate
  • Status newclosed
  • Version trunk1.0

Duplicate of #14273.

Note: See TracTickets for help on using tickets.