It's worth noting that even in the execution path
you get a clue that the table isn't actually visited:

Note the FILTER line -
FILTER means too many things, but one of the
meaning is:
    "I'm not really going to do the child bit
    because I know that the result set will
    be empty"

This meaning appeared (I think) when partition
view were introduced to show partition elimination


Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

  The educated person is not the person 
  who can answer the questions, but the 
  person who can question the answers -- T. Schick Jr


One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html

____UK_______April 8th
____UK_______April 22nd
____Denmark__May 21-23rd
____USA_(FL)_May 2nd

Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
____UK_(Manchester)_May
____Estonia___June (provisional)
____USA_(CA, TX)_August

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html


----- Original Message ----- 
> 
> select count(*) from crazy_table where 1=2
> 
> Explain Plan
> ---------------------------------------------------------------
> ...4 SELECT STATEMENT
> ...3 .SORT (AGGREGATE)
> ...2 ..FILTER
> ...1 ...TABLE ACCESS (FULL) OF 'ARTHUR.CRAZY_TABLE'
> 

> 
> 
> 
> >>> [EMAIL PROTECTED] 04/03/03 05:58PM >>>
> 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 .
> 


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jonathan Lewis
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to