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 -> Oracle scans table with "WHERE (1=0)"?

Oracle scans table with "WHERE (1=0)"?

From: Joe Weinstein <joeNOSPAM_at_bea.com>
Date: Fri, 07 Apr 2006 12:07:49 -0700
Message-ID: <4436b8b1@news.bea.com>

Hi all. I had a customer report that the query below scans the table. Can that be true, that Oracle doesn't realize during construction of the query plan that the search argument will never be satisfied?

SELECT 1 FROM ACTIVITY_ENTRY WHERE (1=0) FOR UPDATE The customer said:

"This query ends up scanning a very large table of ours and exceeds a timeout value. Our DBA made some changes to an index to temporarily workaround the issue, but we want to understand why this is happening."

Thanks,
Joe weinstein at BEA Systems Received on Fri Apr 07 2006 - 14:07:49 CDT

Original text of this message

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