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 -> compute statistics bug

compute statistics bug

From: Rob Gansevles <rob_at_xirion.nl>
Date: Mon, 11 May 1998 12:38:29 +0200
Message-ID: <3556CDED.788AD26D@xirion.nl>


Can anyone reproduce the following bug? We are using Oracle server 7.3.2.1.0 om Unix HPUX10.20

I've attached a small sqlplus-script that creates a table, inserts one record and executes 2 selects on it (the table is dropped again).

The first select gives the correct answer, the second does not.

It seems that a small change in any part of the second select gives a correct result. The problem probably centers around the 'analyze table err_table compute statistics;' statement.

Rob


create table err_table ( field VARCHAR2(100) );

insert into err_table ( field ) values ('val1' );

analyze table err_table compute statistics;

select 'CORRECT RESULT' from dual;

select	field
from	err_table

where (
('a' in ('a') and field in ('val1', 'Y'))
);

select 'ERROR RESULT' from dual;

select	field
from	err_table

where
(
('a' = 'a' and field in ('Z', 'Y'))

 or
('a' in ('a') and field in ('val1', 'Y'))
);

drop table err_table;

quit Received on Mon May 11 1998 - 05:38:29 CDT

Original text of this message

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