MySQL Forums
Forum List  »  General

Re: Intra-Query Parallelism in MySQL Server
Posted by: Rick James
Date: March 09, 2011 08:32PM

Suggest you start with parallelizing PARTITIONed queries. They already take care of collecting the results (a la UNION) into the grand result.

As you master that, you will probably uncover hints of the gotchas. And you may uncover tips on how to split up a query into threads.

Some guesses
* Each thread would be competing for the cached data/indexes.
* What Optimization things can be delegated to each thread, versus left to the controlling process.
* ORDER BY can be pushed down only if the SELECT is split appropriately
* GROUP BY can be pushed down only if the SELECT is split appropriately
* LIMIT m,n can be pushed down as LIMIT m+n; then do the actual LIMIT m,n on the grand result.
* HAVING ?
* If you have N cores, should you plan on N threads? More? Fewer?
* If the query needs to do a table scan, how do you split it up? LIMIT + OFFSET is not viable. The PRIMARY KEY is the obvious choice, but how to you split it up? Especially if there are gaps, or it is not numeric.
* If it is not a table (or index) scan, then what?

Options: ReplyQuote


Subject
Written By
Posted
Re: Intra-Query Parallelism in MySQL Server
March 09, 2011 08:32PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.