Auto no estimates and histograms or small is % no default histograms?

In the past, I used custom written statistics scripts which, by default, collect statistics on large tables with a small percentage estimate and for all COLUMNS of SIZE 1.  They allow the percentage of estimate to be more on individual tables and allow me to choose the individual columns to have histograms with the maximum number of buckets.  The nice thing about this approach is that the statistics ran very efficiently by default and they could dial upward as needed to grant individual queries.

But with 11g, you can set preferences to the level of the table so that the work of automatic statistics or even a manual execution of gather_table_stats will use your settings.  In addition, there are some algorithm of special sampling associated with auto_sample_size that miss you out on if you manually set the percentage of the estimate.  So I could change my approach to query tuning and the collection of statistics to use AUTO_SAMPLE_SIZE and for all COLUMNS size AUTO by default and then replace these if necessary to grant a request or if necessary for statistics to be executed in a reasonable time.

I work in a large enough company with a team of about 10 DBA and a group of developers and over 100 Oracle databases, so we can not really carefully keep track of each system.  Having default values be less intensive resources saves me grief to have stats jobs to run too long, but it requires intervention when a request needs to be tuned.  Also, with my custom scripts I get a lot of hassle for people willing to know why I do not use the default settings of Oracle is negative.  But I saw the default settings, even on the 11.2, running too long on large tables.  Generally, our systems are starting small and then data grows and grows until things start to break auto stats can seem you well at all at first, but eventually they starts to run too long.  Also, when the jobs of his stats run forever or automatic tasks do not end in the window, I get complaints about the stats taking too long or not up-to-date.  Therefore, any sense has its advantages and disadvantages that I can tell.

So, my question, fueled by a day of work post Sierra Nevada Pale Ale, is if anyone else has this same dillema and how you solved.  I appreciate any input on this subject.

-Bobby

Hi Bobby,.

> Also, when statistical work run forever or automatic tasks do not end in the window I get complaints about the stats taking too long or not up-to-date

Complaints about statistics "not up-to-date" are very common, but they do not need to be "up-to-date"... they just need to be... represents a very significant difference

> I think that this amounts to estimate the percentage and histograms.  If you can't get the percentage and histograms want to finish, you need to dial them back but then stats are not as good.

Know how histograms are brought together under the hood for each column. There are a few nice improvements with AUTO_SAMPLE_SIZE (Blog: How AUTO_SAMPLE...). However if you want to learn more about the improvements of NDV or summaries - please consult the book of Amit Poddar pass a separate sampling.

Personally, I usually start by "FOR ALL COLUMNS SIZE 1" and AUTO_SAMPLE_SIZE (from scratch) and only edit table preferences that must be changed (such as histograms due to the inclination of data, etc..). Other basic stuff works pretty well in most of the cases and so I usually don't need to put a lot of effort into it (you need not to fix something that isn't broken). He published also with aggressive sampling and CBO behavior changes (like fix_control 5483301: power off), but this must be matched to the case by case of course.

Concerning

Stefan

Tags: Database

Similar Questions

Maybe you are looking for

  • Safari does not load some sites

    I just got a brand new iMac 27 "and after a few weeks, Safari seems not to want to take care of some sites, Wordpress.com in particular and now Google Mail, Twitter, the blue loading bar in the area address gets about a quarter of the responsible way

  • Device not recognized - the firmware update does not work

    I opened my package and am trying to get up and running. I have a 5 or 6 year, PC - computer Dell Pentium 1.8 ghz running Windows XP - SP 3 and Windows Media Player version 11. Plug in my Fuze v02.01.09A - I get a peripheral grateful error When I in

  • Need for a procedure step by step on how to make a backup of files

    Hello. I am very new to back up. I of course I generated files and system files. What I need is a procedure step by step for backup I generated the files and system files on a DVD. Once on the DVD I need to know how to check what files are contained.

  • What is the hotfix installation program?

    I have 20 files on my c: drive that contain the hotfixinstaller.exe and many different folders to the breast.  What do these and I can delete them?

  • Appropriate in h8 - 1240t

    I want to upgrade my GPU to a XFX Radeon 6870, which I think would agree (?), however the PSU I have in mind will be? I would use the Corsair HX650W, measuring 150mm (W) x 86mm (H) x 150mm (L)... which is about 5.9x3.4x7.9 inches. I have the h8 - 124