Opened 11 years ago
Closed 11 years ago
#26419 closed enhancement (duplicate)
maybe_create_table is very resource intensive
Reported by: |
|
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)
Change History (3)
Note: See
TracTickets for help on using
tickets.
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.