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: Stop Criteria for Sql Execution

RE: Stop Criteria for Sql Execution

From: Mercadante, Thomas F <thomas.mercadante_at_labor.state.ny.us>
Date: Mon, 7 Mar 2005 14:44:18 -0500
Message-ID: <C9995D8C5E0DDA4A8FF9D68EE666CE0704AC0309@exchsen0a1ma>


Jonathan,

My simple point was that the query was stupidly written - a column logically cannot be both null and 20 at the same time. Never mind the use of bind variables.

While I agree that Oracle "should be" able to determine that logically this is a silly query and return no rows without doing any real work, the programmer "should be" able to construct an un-ambiguous query and not depend on Oracle to clean up his/her lack of thought and attention to detail.

Tom

-----Original Message-----
From: Jonathan Lewis [mailto:jonathan_at_jlcomp.demon.co.uk] Sent: Monday, March 07, 2005 2:30 PM
To: thomas.mercadante_at_labor.state.ny.us; Waleed.Khedr_at_FMR.COM; oracle-l_at_freelists.org
Subject: Re: Stop Criteria for Sql Execution

Thomas,

Bear in mind that when something
is stripped down to the bare minimum
to identify the critical point, it can look
"obviously wrong".

Oracle can do the same sort of FILTER
trick at run time with bind variables - and it is possible for users to be unaware that they are supplying predicates that Oracle
"knows" will return an empty set.

Regards

Jonathan Lewis

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

http://www.jlcomp.demon.co.uk/seminar.html Public Appearances - schedule updated Jan 21st 2005

Waleed,

Maybe Oracle should be smarter and recognize the craziness of the query.

But then, maybe the developer should also recognize the problem.

Perhaps your frustration is pointing in the wrong direction?

Tom

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 07 2005 - 14:47:35 CST

Original text of this message

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