tmp table issues caused by WP_Query
|Reported by:||FrederickTownes||Owned by:|
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.