| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> CBO bug?
Very strange behavior - I ran into a scenario where the CBO (Oracle
8.1.7) actually computed a negative value for a cost of a query (and
in turn, gave a horrendous execution plan involving unnecessary
cartesian products of multi-million row tables).
I've stripped the real-world query down to pinpoint the problem, and developed a test case which consistently gives negative valued costs.
Here is the test case:
DROP TABLE TAB1
/
CREATE TABLE TAB1 (COL1 VARCHAR2(1))
/
CREATE INDEX TAB1_N1 ON TAB1(COL1)
/
SELECT * FROM DUAL,
(SELECT COL1
FROM TAB1,DUAL
WHERE DUMMY = COL1
Can anyone confirm this bug on 8.1.7? Could someone with a 9i database give it a shot? Thanks!
-Kevin
Received on Wed Jul 21 2004 - 09:18:12 CDT
![]() |
![]() |