Re: Is inner query executed for each row of ... ?

From: -CELKO- <jcelko212_at_earthlink.net>
Date: Thu, 02 Aug 2007 09:54:41 -0700
Message-ID: <1186073681.133313.233870_at_z24g2000prh.googlegroups.com>


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
  FROM A
 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

Original text of this message