Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> bitmap index different results
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:31:44 CST