Re: bitmap index not used

2003-10-29 Thread Mladen Gogala
Which version of the database? Do you have any  special setup? Any optimizer parameters
on either session or system level?
On 10/29/2003 03:09:39 PM, Josh Collier wrote:
 Hi,
 
 I have a puzzle.
 
 A bitmap index on a varchar2(25) column. table has 7131413 rows, of which
 7125290 are null for the column in question, the rest of the rows are unique
 values. There is a histogram on this column, it has 2 buckets.
 
 A select statement using this column in the where clause generates two
 plans, one which uses the index and one which doesn't. The deciding factor
 is the length of the string in the filter.
 
 select * from table where microchip_number = 'avid1'
   this produces a plan which uses the bitmap
 
 select * from table where microchip_number = 'avid12' (and any additional
 characters in the string ) 
   this produces a plan which uses a full table scan.
 
 I am stumped about how to figure out why the optimizer makes a choice based
 upon the length of the string in the predicate.
 
 Much obliged,
 
 Josh
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Josh Collier
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 

Mladen Gogala
Oracle DBA



Note:
This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  No confidentiality or privilege is 
waived or lost by any mistransmission.  If you receive this message in error, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to 
monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender, except where 
the message states otherwise and the sender is authorized to state them to be the 
views of any such entity.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: bitmap index not used

2003-10-29 Thread Josh Collier
version 8.1.7.4
optimizer parameters are default. 

-Original Message-
Sent: Wednesday, October 29, 2003 12:34 PM
To: Multiple recipients of list ORACLE-L


Which version of the database? Do you have any  special setup? Any optimizer
parameters
on either session or system level?
On 10/29/2003 03:09:39 PM, Josh Collier wrote:
 Hi,
 
 I have a puzzle.
 
 A bitmap index on a varchar2(25) column. table has 7131413 rows, of which
 7125290 are null for the column in question, the rest of the rows are
unique
 values. There is a histogram on this column, it has 2 buckets.
 
 A select statement using this column in the where clause generates two
 plans, one which uses the index and one which doesn't. The deciding factor
 is the length of the string in the filter.
 
 select * from table where microchip_number = 'avid1'
   this produces a plan which uses the bitmap
 
 select * from table where microchip_number = 'avid12' (and any additional
 characters in the string ) 
   this produces a plan which uses a full table scan.
 
 I am stumped about how to figure out why the optimizer makes a choice
based
 upon the length of the string in the predicate.
 
 Much obliged,
 
 Josh
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Josh Collier
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 

Mladen Gogala
Oracle DBA



Note:
This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information.  No
confidentiality or privilege is waived or lost by any mistransmission.  If
you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute,
print, or copy any part of this message if you are not the intended
recipient. Wang Trading LLC and any of its subsidiaries each reserve the
right to monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized to
state them to be the views of any such entity.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Josh Collier
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: bitmap index not used

2003-10-29 Thread Tanel Poder
I'd recommend you to take a dump.
A 10053 dump.
And see from there.

:)

Tanel.

- Original Message - 
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 10:09 PM


 Hi,

 I have a puzzle.

 A bitmap index on a varchar2(25) column. table has 7131413 rows, of which
 7125290 are null for the column in question, the rest of the rows are
unique
 values. There is a histogram on this column, it has 2 buckets.

 A select statement using this column in the where clause generates two
 plans, one which uses the index and one which doesn't. The deciding factor
 is the length of the string in the filter.

 select * from table where microchip_number = 'avid1'
 this produces a plan which uses the bitmap

 select * from table where microchip_number = 'avid12' (and any additional
 characters in the string )
 this produces a plan which uses a full table scan.

 I am stumped about how to figure out why the optimizer makes a choice
based
 upon the length of the string in the predicate.

 Much obliged,

 Josh

 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Josh Collier
   INET: [EMAIL PROTECTED]

 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tanel Poder
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: bitmap index not used

2003-10-29 Thread Khedr, Waleed
Probably the histogram is deciding that. Remove the histogram and see if
there is any changes.

Waleed

-Original Message-
Sent: Wednesday, October 29, 2003 3:10 PM
To: Multiple recipients of list ORACLE-L


Hi,

I have a puzzle.

A bitmap index on a varchar2(25) column. table has 7131413 rows, of which
7125290 are null for the column in question, the rest of the rows are unique
values. There is a histogram on this column, it has 2 buckets.

A select statement using this column in the where clause generates two
plans, one which uses the index and one which doesn't. The deciding factor
is the length of the string in the filter.

select * from table where microchip_number = 'avid1'
this produces a plan which uses the bitmap

select * from table where microchip_number = 'avid12' (and any additional
characters in the string ) 
this produces a plan which uses a full table scan.

I am stumped about how to figure out why the optimizer makes a choice based
upon the length of the string in the predicate.

Much obliged,

Josh

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Josh Collier
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Khedr, Waleed
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).