Re: Better way (more efficient) to find existance of row
From: Norman Dunbar <oracle_at_dunbar-it.co.uk>
Date: Tue, 21 May 2013 15:40:03 +0100
Message-ID: <519B8743.3080004_at_dunbar-it.co.uk>
On 21/05/13 15:26, Lyall Barbour wrote:
> Hello,
> I'm trying to find out if there's a better/faster way to find the existence of a row.
> The vendor has this query:
> select 'Y' from <table> c where c.<col1> = a.<col1> and rownum = 1
Date: Tue, 21 May 2013 15:40:03 +0100
Message-ID: <519B8743.3080004_at_dunbar-it.co.uk>
On 21/05/13 15:26, Lyall Barbour wrote:
> Hello,
> I'm trying to find out if there's a better/faster way to find the existence of a row.
> The vendor has this query:
> select 'Y' from <table> c where c.<col1> = a.<col1> and rownum = 1
I would look at the use of EXISTS which is designed to tell is a row exists or not.
Cheers,
Norm.
-- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767 -- http://www.freelists.org/webpage/oracle-lReceived on Tue May 21 2013 - 16:40:03 CEST