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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: why ?????????

Re: why ?????????

From: AK <oramagic_at_hotmail.com>
Date: Fri, 04 Apr 2003 07:54:07 -0800
Message-ID: <F001.0057A6D0.20030404075407@fatcity.com>


which means query data dictionary for table defination , but why go to db blocks ?

-ak

>
> There are perfectly valid reasons for querying
> a table when no rows are expected to be returned.
>
> create table x
> as
> select *
> from y
> where 1=2;
>
> ... comes to mind.
>
> Jared
>
> On Thursday 03 April 2003 15:58, AK wrote:
> > If I execute a query like ,
> > select count(*) from some_table where 1=2 .
> > why does oracle bothers to look at tables . Since there is only one
> > condition which is false .
> >
> > If I write a sql like
> >
> > select count(*)
> > from some_table
> > where column_a= :a
> > and a is not null;
> >
> > it should not even go to look at table , but explain plan suggests that
it
> > does a index /table scan .
> >
> > -ak
>
> ----------------------------------------
> Content-Type: text/html; charset="iso-8859-1"; name="Attachment: 1"
> Content-Transfer-Encoding: quoted-printable
> Content-Description:
> ----------------------------------------
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jared Still
> INET: jkstill_at_cybcon.com
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: AK
  INET: oramagic_at_hotmail.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Apr 04 2003 - 09:54:07 CST

Original text of this message

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