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

Re: compute statistics bug

From: Vincent Birlouez <birlouezv_at_hotmail.com>
Date: Thu, 21 May 1998 17:09:46 +0100
Message-ID: <356451CA.5523596F@hotmail.com>


Oracle 7.3.3.3.0 on NT3.51 : No bug.

Rob Gansevles wrote:

> 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 Thu May 21 1998 - 11:09:46 CDT

Original text of this message

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