Database Tuning (MOSC)

MOSC Banner

Bind Variable Peeking, Histograms and Invalidating of a cursor in shared pool

edited May 18, 2011 3:53PM in Database Tuning (MOSC) 1 commentAnswered
Hi,

In a 10g database (10.2.0.4), assuming that bind variable peeking is in place (the default) and due to the nature of it, sometimes
it generates and start using a really bad execution plan based on the passed on value (of bind variable)

Let us suppose that there is a query involving 3 tables. One of the columns in one of the table has SKEWED data as below

select flag,count(*) from table_a group by flag;

FLAG    Count(*)
================
Y    955489
N       12

In the query, there is a where clause like this --> where table_a.flag=:1 (yep, the query is using bind variable)

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