3 ms·
> relational merges are done in parallel. For merges which can be done in parallel I assume? For example: SELECT * FROM a JOIN b ON b.id = a.b_id
by schmichael 13y ago
> relational merges are done in parallel.
For merges which can be done in parallel I assume? For example:
SELECT * FROM a
JOIN b ON b.id = a.b_id
JOIN c ON c.id = b.c_id
WHERE a.foo = "bar";
How can a client effectively do the joins in parallel?
You cannot query b until you know all b_ids from a (unless you materialize all of b clientside which obviously performs terribly on non-trivial datasets).
Likewise you cannot query c until until you have the set of c_ids from bs (which as stated before are dependent upon the results of a).
An RDBMS can merge JOINs as it goes but to simulate that you'd have to do 1 query against b for every record streamed back from the a query. That also will scale terribly for non-trivial datasets.
As far as I can tell there are no docs for this feature, and the post lacks any technical details.
- marknadal 13y agoYes, of course. If you take a look at the example... user.id and tournament.id can be merged in parallel to the initial game.level lookup. Obviously subsequent relations can't be done in parallel, but the ones that can will be.