Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL Humor

Re: SQL Humor

From: Paul <paul_at_test.com>
Date: Fri, 19 Aug 2005 11:20:31 +0100
Message-ID: <4305b683$0$1290$ed2619ec@ptn-nntp-reader02.plus.net>


Mike Hodgson wrote:
> The EXISTS() predicate is typically a fairly efficient predicate because
> it only needs to scan until it gets a match, at which time it returns.
> The worst case scenario (it finds a match on the last physical row, or
> it doesn't find any matching row) is the same I/O as the IN() predicate
> case because IN() will evaluate the entire subquery.

Why does IN() need to evaluate the entire subquery? Couldn't it in theory work exactly the same as EXISTS() at the physical level?

Paul. Received on Fri Aug 19 2005 - 05:20:31 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US