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

Home -> Community -> Usenet -> c.d.o.server -> Re: Select Statement

Re: Select Statement

From: Terry Dykstra <tddykstra_at_forestoil.ca>
Date: Fri, 21 Apr 2006 16:29:41 GMT
Message-ID: <VL72g.5190$fL.2761@edtnps90>


"eye1h" <eye1h_at_yahoo.com> wrote in message news:1145634011.705330.91550_at_u72g2000cwu.googlegroups.com...
> Hi Steve,
>
> My query had the SELECT COUNT(*) from tbl_name where condition and
> rownum=1.
> which went through all rows.
>
> Upon looking at your one and changing it to
> SELECT 1 from tbl_name where condition and rownum=1 is fetches with
> few rows in explain plan.
>
> COUNT(*) was the culprint here.. I was not aware of this. Thank you
>

My example didn't have the count(*) either. It said: select 1 from ....

-- 
Terry Dykstra
Received on Fri Apr 21 2006 - 11:29:41 CDT

Original text of this message

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