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: Ashish Sahasra <ashish_at_superlink.net>
Date: Fri, 15 May 1998 19:50:44 EDT
Message-ID: <6jikck$i6r$1@earth.superlink.net>


It works properly on personal oracle 7.2.2.3.1 on windows 95

cmohan_at_iname.com wrote in message <6jafpv$5mf$1_at_nnrp1.dejanews.com>...
>You are right. It is strange.
>I tried this on Personal Oracle 7.3.2, on Windows 95. The second query did
not
>produce any results.
>
>Please let us know once you find out!
>CM
>
>
>
>In article <3556CDED.788AD26D_at_xirion.nl>,
> Rob Gansevles <rob_at_xirion.nl> wrote:
>>
>> This is a multi-part message in MIME format.
>> --------------BE16F02D10FD3BFFACDC4FF7
>> Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854";
>x-mac-creator="4D4F5353"
>> Content-Transfer-Encoding: 7bit
>>
>> 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
>>
>> --------------BE16F02D10FD3BFFACDC4FF7
>> Content-Type: text/plain; charset=us-ascii; x-mac-type="54455854";
>x-mac-creator="74747874"; name="err.sql"
>> Content-Transfer-Encoding: 7bit
>> Content-Description: SimpleText Document
>> Content-Disposition: inline; filename="err.sql"
>>
>> 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
>>
>> --------------BE16F02D10FD3BFFACDC4FF7--
>>
>>
>
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading
Received on Fri May 15 1998 - 18:50:44 CDT

Original text of this message

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