Re: Is inner query executed for each row of ... ?
Date: Thu, 02 Aug 2007 09:54:41 -0700
Who knows? Each product is free to do anything it wants as long as it returns the right answer. I can make a guess from working with optimizers about how this will run.
SELECT a1, a2
WHERE (SELECT COUNT(*)
FROM B WHERE B.b1 = A.a1) >= 2;
I go to table B and hash it on B.b1 in parallel. The hashing system can do the count very fast because hash clash is recorded. I join that working table to A. Received on Thu Aug 02 2007 - 18:54:41 CEST