Re: Distinct values
Date: Thu, 5 Aug 2010 02:38:21 -0700 (PDT)
Message-ID: <5db14c76-ca6d-4408-a115-c51bfb1fed95_at_u26g2000yqu.googlegroups.com>
On Aug 5, 10:24 am, Randolf Geist <mah..._at_web.de> wrote:
> I've done some time ago a general discussion on the limitations of
> histograms with DBMS_STATS, since the issue is not limited to
> character columns:
>
> http://oracle-randolf.blogspot.com/2009/01/limitations-of-histograms-...
Good demonstartion on your blog. As you pointed out you can get some bad behaviour if storing strings with a long common root at the start (URL's for example.)
This behaviour combined with automatic histogram generation in 10G,
bind variable peeking and queries that re-parse frequently has on more
than one occasion lead to queries that repeatedly flipped between good
and ban plans due
to a very high skew (50% of data in one bucket) from the histograms
even though each 'full' URL was fairly distinct. I do really think the
10G default auto histogram generation combine with bind peeking in a
OLTP environment is a very bind combination and potentially very
unstable.
Received on Thu Aug 05 2010 - 04:38:21 CDT