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: bitmap index different results

Re: bitmap index different results

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 8 Dec 1999 15:45:07 -0000
Message-ID: <944668179.20005.0.nnrp-01.9e984b29@news.demon.co.uk>

The code looks as if it should
return the same answer in all
three cases, although it would
be nice to see the column type
definitions and know what you
were partitioning on.

Is this using parallel query,
and can you send us the
detailed execution path. (Using
the scripts supplied by oracle
with the release).

It would also be a good idea to generate (but don't send) a trace file for the query to see if you can spot where the rows
are being lost - in the index or in the table.

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Bernhard Seeling wrote in message <82ltp6$h00$1_at_newsread.do.de.uu.net>...
>Dear all,
> There is a problem with count of rows !
>
>HPUX 11.00 oracle EE 8.1.5
>
>on a partitioned table TEST I create
>the indexes
>
>CREATE BITMAP INDEX
> BMI_JAHR ON TEST (JAHR)
> LOCAL
> (PARTITION "P94Q1"
> PARTITION "P94Q2"
> PARTITION "P94Q3"
> PARTITION "P94Q4"
> ......
> PARTITION "P99Q3" );
>
>
>CREATE BITMAP INDEX
> BMI_QUARTAL ON TEST (QUARTAL)
> LOCAL
> (PARTITION "P94Q1"
> PARTITION "P94Q2"
> PARTITION "P94Q3"
> PARTITION "P94Q4"
> PARTITION "P95Q1"
> ......
> PARTITION "P99Q3" );
>
>analyze the table and indexes
>
>then I execute the sql-scripts
>
>SQL>select count(*) from TEST
> where JAHR in ( '1997' , '1999' ) and
> QUARTAL <= '02' ;
>
> COUNT(*)
>------------
> 0
>
>SQL>select count(*) from TEST
> where ( JAHR = '1997' and QUARTAL <= '02' ) OR
> ( JAHR = '1999' and QUARTAL <='02' );
>
> COUNT(*)
>------------
> 656231
>
>SQL>select count(*) from TEST
> where JAHR in ( '1997' , '1999' ) and
> QUARTAL in ( '01' , '02' ) ;
>
> COUNT(*)
>------------
> 656231
>
>
>Why is the first count = 0 ???
>
>mfG Bernhard !
>
>
Received on Wed Dec 08 1999 - 09:45:07 CST

Original text of this message

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