Auto estimate percent and histograms or small est percent no histograms by default?

In the past I've used custom written statistics gathering scripts that by default gather statistics on large tables with a small estimate percentage and FOR ALL COLUMNS SIZE 1.  They allow the estimate percentage to be set higher on individual tables and allow me to choose individual columns to have histograms with the maximum number of buckets.  The nice thing about this approach was that the statistics ran very efficiently by default and they could be dialed up as needed to tune individual queries.
But, with 11g you can set preferences at the table level so that the automatic stats job or even a manual run of gather_table_stats will use your settings.  Also, there is some special sampling algorithm associated with auto_sample_size that you miss out on if you manually set the estimate percentage.  So, I could change my approach to query tuning and statistics gathering to use AUTO_SAMPLE_SIZE and FOR ALL COLUMNS SIZE AUTO by default and then override these if needed to tune a query or if needed to make the statistics run in an acceptable length of time.
I work in an largish company with a team of about 10 DBAs and a bunch of developers and over 100 Oracle databases so we can't really carefully keep track of each system.  Having the defaults be less resource intensive saves me the grief of having stats jobs run too long, but it requires intervention when a query needs to be tuned.  Also, with my custom scripts I get a lot of hassles from people wanting to know why I'm not using the Oracle default settings so that is a negative.  But I've seen the default settings, even on 11.2, run much too long on large tables.  Typically our systems start small and then data grows and grows until things start breaking so the auto stats may seem fine at first, but eventually they will start running too long.  Also, when the stats jobs run forever or with the automatic jobs don't finish in the window I get complaints about the stats taking too long or not being updated.  So, either direction has its pros and cons as far as I can tell.
So, my question, fueled by a post work day Sierra Nevada Pale Ale, is whether anyone else has this same dillema and how you have resolved it.  I appreciate any input on this subject.
- Bobby

Hi Bobby,
> Also, when the stats jobs run forever or with the automatic jobs don't finish in the window I get complaints about the stats taking too long or not being updated
Complaints about "not updated" statistics are very common, but they don't need to be "up-to-date" ... they just need to be representative ... a very important difference
> I think it comes down to estimate percentage and histograms.  If you can't get the percentage and histograms you want to complete in time you have to dial them back but then the stats aren't as good.
Be aware of how histograms are gathered under-the-hood for each column. There are some nice improvements with AUTO_SAMPLE_SIZE (Blog: How does AUTO_SAMPLE...). However if you want to know more about the NDV improvements or the synopses - please check out the paper of Amit Poddar One Pass Distinct Sampling.
Personally i usually start with "FOR ALL COLUMNS SIZE 1" and AUTO_SAMPLE_SIZE (from the scratch) and change only the table preferences that need to be adjusted (like histograms due to data skew, etc.). The other basic stuff works pretty well in most cases and so i usually don't need to put much effort in it (you don't need to fix something, that is not broke). There also issues with aggressive sampling and CBO behavior changes (like fix_control 5483301:off/on), but this needs to be cross-checked from case to case of course.
Regards
Stefan

Similar Messages

  • Auto correct the inputs received to Initial Capital and other letter small

    Hi,
    Please help to solve this..
    In HRMS is there any auto correct the inputs received to Initial Capital and other letter small in HRMS. E.g. If data is received by HRMS as 'RAMA' HRMS should auto correct to 'Rama' from legacy system(Input Files)
    Thanks-

    Is this a migration question? If so, you can apply a mask to the source data at the point of calling the api, e.g.
    p_last_name => INITCAP(source_last_name),
    etc

  • Hi, can someone please tell me why the spell check in pages doesn't work. I went to preferences and enabled this auto spell checker and have set the language to british english. But still it doesn't work while it works perfectly in TextEdit.

    Hi, can someone please tell me why the spell check in pages doesn't work. I went to preferences and enabled this auto spell checker and have set the language to british english. But still it doesn't work while it works perfectly in TextEdit.

    Inspector > Text > More > Language
    Only applies to selected text, like making it a particular font.
    It is not a setting that sticks. If you continue to paste in text from elsewhere particularly the Internet it will have a different or None language set to it. You need to select it and make it B.E.
    Peter

  • SPA8800 and SRST for small branch office?

    Hi All,
    Need some help. I have a central site that will be running Cisco BE 5000. I have a small branch office I would like to place IP phones in so we can just dial an extension to call each other. The branch will have its own connection to the PSTN with a couple of POTS lines from the phone company.
    So I am wondering how I can connect branch and HQ for intra-office calling and let the branch office use their PSTN connection for their local calls. I would think I could place a gateway such as the SPA8800 in the branch and connect the PSTN lines to it.
    My concern is, what happens if I lose the WAN connection between HQ and branch? Then the branch could not make any calls right? I know a little about SRST and how that solves the issue of losing WAN connection with the central Call Manager site, but I what I don't understand is SRST something that can run on a device like the SPA8800 or do I need an ISR router in the branch that can run SRST if I want the branch to be able to make phone calls without a connection to HQ?
    Thanks for any help!                  

    u may but any plane wireless device and run it in bridge mode (shouldd run by default i beleive). Then connect one of its lan port to any one of the lan ports available on the DPC3829 thing.
    you are correct in what you want to do, and it can be done no problem.
    Regards
    Please mark answer as correct if it helps.

  • In Lion, why did Apple remove the up/down arrows in the scroll bars?  There is currently no way to move up and down in small increments.  WHY????

    Every mac operating system software until Lion had the ability to use up/down arrows in the scroll bar.  This makes it easy to move up and down in small increments.  In Lion, it is impossible to move up and down in small increments.  Click on the scroll bar and it moves up or down an entire page.  When you try to put the curser on the scrollbar and move it up just a little, it moves a whole bunch.  With the up/down arrows, you can click on the arrow and it will scroll ulp or down one line a time.  There is no way to do this in Lion. Why would apple remove the very useful feature of up and down arrows.

    Yes, agreed a missing element.
    Did you try using the up / down arrows on the key board.

  • HT5654 iTunes auto update downloaded and installed on 28/01/2014. iTunes now won't launch and error message states file MSVCR80.dll is missing. Tried uninstalling and downloading/installing again to no avail. Any clues?

    iTunes auto-update dowloaded and installed on 28/01/2014. iTunes now won't launch and error message states file MSVCR80.dll is missing. Tried unistalling and downloading/installing again to no avail.  Any clues?

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99269)

  • How can I copy part of a larger PDF file and create a smaller one?

    How can I copy part of a larger PDF file and create a smaller one?

    Hi,
    Copy the content of PDF file in Adobe Reader and paset it to MS Word then create PDF file from the Word file.
    This may not work for all PDF files as some PDF files are not created correctly or some content cannot be copied.
    Acrobat XI Pro has features to extract/delete/crop pages in PDF files and you can download it from www.adobe.com(Trial version- 30 days free). Or you can upgrade your subscription to Acrobat Plus and see more information at https://www.acrobat.com/acrobatplus/en/home.html
    Hisami

  • Auto Date field and Auto Number field

    I am fairly new to this,
    I have crated a form using the form wizard in Acrobat Pro 9.0 and I would like to make a field an Auto date field and another an Auto Numbering field. I have read a lot of the posts and there are a lot of recommendation to point the auto number to a database. This is fine but I do not know how to reference that field to an external database. PLEASE HELP!!!! Somebody GEEK me!!

    I am fairly new to this,
    I have crated a form using the form wizard in Acrobat Pro 9.0 and I would like to make a field an Auto date field and another an Auto Numbering field. I have read a lot of the posts and there are a lot of recommendation to point the auto number to a database. This is fine but I do not know how to reference that field to an external database. PLEASE HELP!!!! Somebody GEEK me!!

  • When I open a file it normally opens in 12.5% stated on the header. For some reason, it now opens with 100+% on the header and is much smaller in size. How do I go back to the first option I noted? I use AP to work on blueprints for measuring so the accur

    When I open a file it normally opens in 12.5% stated on the header. For some reason, it now opens with 100+% on the header and is much smaller in size. How do I go back to the first option I noted? I use AP to work on blueprints for measuring so the accuracy matters. Any direction would be greatly appreciated. Thank you.

    Are the image all the same size the % files open into a document seems to vary with the number of pixels the image being opened has.  Check the Image size.

  • Why are my Illustrator images getting thicker strokes when I take the bounding box and make them smaller?

    Why are my Illustrator images getting thicker strokes when I take the bounding box and make them smaller? This has never happened to me. I'm not an expert at Illustrator, but I do know some fundamentals.

    Thank you for responding so quickly. No apologies necessary - I know this Forum isn't McDonalds - don't expect an answer to be served up right away. You helped me out with a big issue yesterday.
    I am using a mac - OSX 10.7.5
    I have Adobe Creative Suites - CS5 - Illustrator version is 15.0.2
    The contents I am placing are all  Vector - Illustrator files
    But, I wonder about some of the vector files I work with.  Could a "line weight/thickness" be 'assigned' to the drawing and screw things up? I used 'simple' linear (line) drawings from SolidWorks that have been converted to ai files. It's just weird because I checked the stroke of the drawing and it's not out of line.
    I am attaching part of some box labels. You can see how the drawings, of the products, on the 'left side' are "thick" after embedding them. I think the "Global Logo" was pasted into a template not linked that's why it's okay. But look at the Quiet Thunder logo - it looks terrible. These labels are only 2.25" X 6.5", so its important I keep the images lightweight. 
    Your help is very much appreciated. Thank you!

  • Table and columns in small caps!

    Dear All,
    My database is 11gR2 and Linux is the OS.
    One of my application, whose code I am unable to access, it trying to insert records in Oracle database. The problem is that application is case sensitive and try to find table name and columns in small caps, while it gets upper case from Oracle and give error or invalid identifier.
    Is there any option to create table and fields with small letters.
    Kindly help.
    Regards,
    Imran

    misterimran wrote:
    ...The problem is that application is case sensitive and try to find table name and columns in small caps...What application could look for tables/columns in small caps ? As stated above, creating tables/columns enclosed by double quotes might help, but that'd mean the code must use double quotes everywhere...
    while it gets upper case from Oracle and give error or invalid identifier. It get as is, please show the error.
    Nicolas.

  • Hi, I've got me a 4k pc screen and when I open up photoshop CC the tools and panels very small. Can I change the size of these?

    Hi, I've got me a 4k pc screen and when I open up photoshop CC the tools and panels very small. Can I change the size of these?

    If you have CC you can go to preferences>Experimental features and select scale UI 200%. Otherwise you're out of luck.

  • Display first letter as caps and rest in small

    hi ,
    this is the scenario...i have an internal table in which one field is a character...and the records in the internal table field has names in it..and i have to print in form in the way that first letter is capital and rest is small hear is am example.....
    internal table....ITAB with fields...X X X Char.
    records in Char...
    ron
    Tom
    dany
    aron....
    these are retrieved from the data base...so there is no garnets that they are maintained in the way i required...
    Records should be printed in this fashion in form...
    <b>R</b>on
    <b>T</b>om
    <b>D</b>any
    <b>A</b>ron
    Thanks in advance

    It is tested  workin fine  just copy and  paste  it  and  run...
    DATA: OUTPUT TYPE STRING.
    CALL FUNCTION 'SWA_STRING_TO_UPPERCASE'
    EXPORTING
       INPUT_EXPRESSION                 = 'KISHAN'
    *   INPUT_STRING                     =
       PRESERVE_EXISTING_CAPITALS       = ''
       CAPITALIZE_AFTER_SPACE           = 'X'
       LANGUAGE                         = SY-LANGU
    IMPORTING
       OUTPUT_STRING                    = OUTPUT
    *   OUTPUT_EXPRESSION                =
    EXCEPTIONS
       EXPRESSION_TRUNCATED             = 1
      OTHERS                           = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    kishan negi

  • Auto-Accounting Functions And Function Transaction scenarios

    Hello Experts,
    Do somebody have the complete information about the the list of Auto-accounting functions triggered @ time of events or functions like costing, revenu , billing etc?
    Example - Expense Report Cost Account is fired when you run PRC:Distribute expense report cost ? sure ?? or when entered i-Expense? It will be gr8 to have some detail understanding on Auto-Accounting fucntions and their cause of origin.
    Provider Cost Reclass Credit Account / Provider Cost Reclass Debit Account - Origin??
    Thanks

    Hello Experts,
    Do somebody have the complete information about the the list of Auto-accounting functions triggered @ time of events or functions like costing, revenu , billing etc?
    Example - Expense Report Cost Account is fired when you run PRC:Distribute expense report cost ? sure ?? or when entered i-Expense? It will be gr8 to have some detail understanding on Auto-Accounting fucntions and their cause of origin.
    Provider Cost Reclass Credit Account / Provider Cost Reclass Debit Account - Origin??
    Thanks

  • TS2634 My wireless keyboard is auto filling letters and numbers what do I do to stop this?

    My wireless keyboard is auto filling letters and numbers what do I do to turn it off?

    Hi Pegfraser,
    Does this happen only with the wireless keyboard and not the touch keyboard?  And which Apps does this happen with?
    In general, auto fill is a settings thing.
    For Safari:  Settings, Safari, AutoFill
    System Wide: General, Keyboard, Auto-Correction (may seem like auto fill)
    and you can setup Shortcuts in the Keyboard settings, but you would know if you'd done that.
    ivan

Maybe you are looking for

  • How can i sync my old ipod without knowing my old password and dont have the same email without loosing everything??

    How can I sync my old Ipod without loosing everything? I dont remember my old password and dont have the same email. I have many pics stored on there of many trips we took over the years and songs as well please help...

  • GUI freezes in 10.4.11

    Hi, I originally wrote about this problem in 10.4.10. I just experienced it again. I'm wondering whether other people are experiencing these symptoms: 1. Occurs upon waking from sleep 2. UI/Screen (including menu clock) do not update and are "frozen"

  • Changing SVG chart Labels

    Forum Members, Having never experienced the SVG charts in AE -v1.5- a little help is needed. It will be a simple matter for frequent uses of this function often. The following chart has been created: select null link, i.STATUS label, count(i.STATUS)

  • Simcard registration failed, what to do?

    Hello I've got a problem with my N900 in some countries.  In the following countries the phone works as usual: The Netherlands, Belgium, Germany, Luxemburg, France, Denmark. In the following countries, from the moment I'm on their network, the phone

  • What is error code 1012?

    i tried logging in many times on my facebook app but an error code:1012 appeared. also i cannot update it on app store coz it should connect on itunes. what is this?