Re: DBMS_STATS
Date: Tue, 29 Sep 2009 07:24:46 -0700 (PDT)
Message-ID: <ba838990-c795-4286-a116-798497deedad_at_x37g2000yqj.googlegroups.com>
On Sep 28, 5:15 pm, John Hurley <johnbhur..._at_sbcglobal.net> wrote:
> On Sep 28, 11:42 am, The Magnet <a..._at_unsu.com> wrote:
>
> > Probably a dumb question here, but we're trying to understand
> > DBMS_STATS and all the parameters and such. What a complicated
> > thing. Too many parameters to understand the effects.
>
> > Anyhow, I read that Oracle 10g generates database stats each night.
> > What kind of stats? Does this mean I do not have to compute schema
> > stats?
>
> Here is a guy from the optimizer internals group ... giving the
> "currently recommended way"
>
> http://structureddata.org/2008/03/26/choosing-an-optimal-stats-gather...
>
> Think about using dbms_stats.set_param('AUTOSTATS_TARGET','ORACLE') if
> you want to manage your own schema based stats but let oracle gather
> system related ones.
Decent page to read. The kind of documentation which will need several passes to completely understand.
One question is that each table may have different needs. In a case like this, I have the option of going through each table, or, using manual or dynamic sampling. Though it says Oracle chooses a good value for the sample, it should probably be based on something else.
One thing regarding skewed data that I may not understand the concept. Say I have a table which has a customer ID, which is unique. I assume no reason to gather stats as the number is unique with an index, is that right. However, say there is another column in which 75% of the data contains 1 value. Then, does the table meet the criteria for gathering stats? Should I compute table stats on this?
Sorry for all the questions, just my misguided understanding of the details,
Thanks Received on Tue Sep 29 2009 - 09:24:46 CDT