Re: What is wrong with this query?

From: Dave Erickson <erickson_at_mfa.com>
Date: 1995/05/15
Message-ID: <Pine.HPP.3.91.950515175227.2002B-100000_at_stimpy.mfa.com>#1/1


On 15 May 1995, Chuck Hamilton wrote:

> Date: 15 MAY 1995 21:30:01 GMT
> From: Chuck Hamilton <chuckh_at_ix.netcom.com>
> Newgroups: comp.databases.oracle
> Subject: Re: What is wrong with this query?
>
>
> 2. This select might be a bit faster...
>
> select bill_acct_id from transmission where not exists (select * from
> convert_acct where acct_id = transmission.bill_acct_id);
> --
> ><> Chuck Hamilton <><
> ><> chuckh_at_ix.netcom.com <><
Chuck,

        Doesn't that make for a co-related sub-query? Ie, the inner select has to be re-done for every row fetched in the outer query?

        I would think the original way would be faster, provided he indexed the convert_acct table correctly, and maybe added a 'distinct' to the sub query.

        Just askin....

Dave

David B Erickson, Project Leader     * 
McHugh Freeman                       * "YIP YIP YIP YIP YIP YIP YIP YIP YIP"
erickson_at_mfa.com                     *                           -Dino
Received on Mon May 15 1995 - 00:00:00 CEST

Original text of this message