Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#19608 closed enhancement (duplicate)

tmp table issues caused by WP_Query

Reported by: fredericktownes's profile FrederickTownes Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Database Keywords: has-patch
Focuses: Cc:

Description

Of course, WP doesn't scale in use cases where the query response necessitates huge tmp tables in order to return.

The attached patch is far more performant because it uses an index to perform the operations rather than taking a huge number of rows and trying to operate with them. Although this can be implemented via a few functions/filters, I assumed that this patch would address other use cases than the ones I had to ameliorate; specifically taxing a very serious MySQL cluster and creating tmp tables too large to be written to disk or too large to use /dev/shm (memory).

Originally this patch was written to address issues that become visible when several authors were working with posts.php in WP Admin concurrently.

Attachments (1)

core.patch (2.3 KB) - added by FrederickTownes 13 years ago.

Download all attachments as: .zip

Change History (3)

#1 @scribu
13 years ago

  • Summary changed from tmp table issues to tmp table issues caused by WP_Query

For anyone else trying to figure out what the patch does, it basically splits the main query from WP_Query into two steps:

  1. Get the post ids.
  2. Get the full rows of those ids.

There already are a few other tickets which propose the same thing. (I'll hopefully find them shortly)

#2 @scribu
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.