Database Tuning (MOSC)

MOSC Banner

Issue with this query

edited Oct 27, 2009 5:39AM in Database Tuning (MOSC) 7 commentsAnswered
Hi,

I have the following table with 2+ million rows. Message_id is primary key. We have skewed data on status column (95% of values with value 5 and 5% with value 0).

This is third-party vendor application, they run the following query looking for status of value 1 (million times a day for no reason). I have bit-map index created on status column with histogram data as well.

The issue is if I hard-code query with value 1 or 0, the query uses the bit-map index. When I use bind variable no matter what value I use, oracle does full table-scan. This is causing application slowness. I want your help on how to resolve this.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center