Re: Histogram worthwhile?

I have to say that I think "Bind Variable Peeking" is a bug that
Oracle has dressed up as a feature for the last several years. It just
makes no sense at all to purposely introduce instability the way bind
variable peeking does. In my opinion, histograms cause more problems
than they solve if you don't take the time to apply literals
appropriately in your statements (i.e. where you have skewed data and
have built a histogram). Karen's paper is a great reference on the
subject, by the way. Unfortunately, 10g's default stats gathering
approach creates histograms all over the place. Anyway, 11g finally
addresses the issue. Here's a script that I find useful for 10g.

unstable_plan.sql - It uses an analytic function to calculate a
standard deviation on the average elapsed time by plan. It then lists
the statements which exceed a threshold (i.e. have multiple plans with
a large difference in average elapsed time).