How out-of-date statistics affects the decisions of the optimizer

Hello

We use Oracle 11.1 RAC. The optimizer_dyanmic_sampling parameter is set to 2. We do not voluntarily automatic grouping statistics. We have tables with stale statistics. I'm not asking if we need to collect statistics for these or not. My questions are: what can the optimizer due when he meets obsolete statistics? The optimizer can choose to use dynamic sampling of these tables with stale statistics? If yes how can I determine when this happens?

Thank you

Richard

Published by: rbrieck on November 30, 2011 10:50

I think that bland applies only to decide whether to collect statistics. The optimizer uses information, given in the context where it is running, which can include data access information in more modern versions. Missing statistics affect the optimizer - are stale? Only when he decides to collect.

Tags: Database

Similar Questions

  • How to display date / time in the browser console?

    How to display date / time in the browser console?

    You can set through the Options (gear icon) page in the Web Console (Firefox/tools > Web Developer).
    This applies to the browser console and the Web console.

  • Adobe Acrobat plug of keeps showing that is out of date, even after the update or reinstall.

    Other users have reported similar problems. My particular case: Running Firefox - date (42.0) - Windows 7 (as so far). Firefox has constantly watch the Adobe Acrobat Reader plug-in is not up-to-date. I tried to update and reinstalled Acrobat. I just had request Acrobat update which has been a success and also updated to Firefox. Firefox still has reports that Acrobat is obsolete. Firefox reports that the current add-on is 15.9.20069.28170, but clicking on update now button on the Add you check page contains links to a page of Adobe update with the version number 2015.009.20069. When I search (Google) for the latest version, I've reached a page that lists all versions, updates, etc.. The latest version is 2015.009.20069. According to the Panel, the version of Adobe Acrobat Reader is installed on the computer is 15.009.20077!

    As far as I can tell it's working properly, updated regularly. I don't know where the 28170 number comes from or why page Add on reports that Acrobat is out of date, unless the version update of the Acrobat Reader software is not actually update the Add On from Firefox portion.

    Any suggestion or comment?

    My suggestion is to ignore the information from the website of checker plugin and use the built-in functionality of Adobe to check updates. In your DC of Adobe Reader or Adobe Acrobat DC:

    Help menu > check for updates

    While the site checker plugin uses data provided by Adobe, there seems to be some discrepancies between the program and the version number of plugin that have not yet been resolved.

  • out-of-date statistics - expected behavior?

    If a table is monitored, 0 rows, collect stats, insert 100 rows < do not commit >, flush the pool followed, the show 100 inserted rows and dba_Tab_statistics STALE watch dba_tab_modifications = YES (as BLAND is based on lines changed as a percentage of 10% against the collected statistics)

    Now, lines to restore the 100, drain the pool monitoring, we still see as obsolete statistics.   Is this expected behavior?   It simply means that the table will have its stats are gathered again in the next window of collection if this isn't really a problem but just so I know its expected.

    SQL > drop table t1;

    Deleted table.

    SQL >

    SQL > create table t1 select * from dba_objects where rownum = 0;

    Table created.

    SQL > exec dbms_stats.gather_table_stats (ownname = > user, tabname = > 'T1');

    PL/SQL procedure successfully completed.

    SQL >

    SQL > SELECT table_name, num_rows, stale_stats OF SYS. DBA_TAB_STATISTICS where table_name = 'T1 ';

    TABLE_NAME, NUM_ROWS STA

    ------------------------------ ---------- ---

    T1                                      0 NO

    SQL >

    SQL > insert into t1

    2 Select * from dba_objects

    3 where rownum < 101;

    100 rows created.

    SQL >

    SQL > execute DBMS_STATS. FLUSH_DATABASE_MONITORING_INFO;

    PL/SQL procedure successfully completed.

    -We can see that the lines were chosen as changed since we emptied the pool monitoring

    SQL > select table_name, DBA_TAB_MODIFICATIONS inserts

    2 where table_name = 'T1 '.

    3;

    TABLE_NAME INSERTS

    ------------------------------ ----------

    T1                                    100

    -the stats are now obsolete and

    SQL > SELECT table_name, num_rows, stale_stats OF SYS. DBA_TAB_STATISTICS where table_name = 'T1 ';

    TABLE_NAME, NUM_ROWS STA

    ------------------------------ ---------- ---

    T1                                      0 YES

    -Check the rows are in the table

    SQL > select count (*) from t1;

    COUNT (*)

    ----------

    100

    SQL > rollback;

    Complete restoration.

    -Check the lines are gone

    SQL > select count (*) from t1;

    COUNT (*)

    ----------

    0

    -Rinse the monitoring

    SQL > execute DBMS_STATS. FLUSH_DATABASE_MONITORING_INFO;

    PL/SQL procedure successfully completed.

    SQL >

    - but the tab_modifications and therefore statistics are still showing stale even if 100 inserts restored

    SQL > select table_name, inserts, updates, deletes DBA_TAB_MODIFICATIONS

    2 where table_name = 'T1 '.

    3;

    UPDATES OF INSERTIONS DELETIONS TABLE_NAME

    ------------------------------ ---------- ---------- ----------

    T1                                    100          0          0

    SQL >

    SQL > SELECT table_name, num_rows, stale_stats OF SYS. DBA_TAB_STATISTICS where table_name = 'T1 ';

    TABLE_NAME, NUM_ROWS STA

    ------------------------------ ---------- ---

    T1                                      0 YES

    SQL >

    I think what you describe is a reasonable behavior.

    When you run ROLLBACK, Oracle built more DML to reverse the effect of the previous DML and commits the batch as a single transaction. You can almost say that while SQL has a ROLLBACK command, Oracle does not work. It might be better if in your example DBA_TAB_MODIFICATIONS showed 100 insertions as well as 100 deletions.

    Also, don't forget that there are more statistics than the number of rows. Scopes can have been allocated, high waters moved. The ROLLBACK will affect not the latter, so that they are definitely outdated.

  • How to recover data up to the current timestamp

    The emp table I want to recover data up to the present time how can I do that (until the second current)

    This link will help

    http://www.Oracle.com/technetwork/issue-archive/2012/12-Jan/o12plsql-1408561.html

  • How to copy "Date to update the" to "Date of creation"?

    For some reason, all my photos have had their 'date Created' changed for a date in 2015? I do not have a back-up I can restore (a more 30 000 photos), but both the "date modified" and the date of "Last opened" remain as the original "date of creation".

    Is it possible to copy the 'date Modified' or the 'last opening' to replace the 'created date '?

    ANY suggestions much appreciated.

    Thank you and happy new year,

    Kenneth

    I use a MacBook Air with the latest Photos and operating system installed.

    Where you see the 'creation Date' in the Photos?  The information about the Photos Panel is only indicating the date of capture integrated in the file original image IPTC and EXIF tags.

    File creation date that you see in the Finder, if you access the originals using the Finder, may change, if your library is synchronized with iCloud. All original image in my library on my MacBook Pro to iCloud retina display a date of creation sometime in July, when I downloaded the iCloud library.

  • How to trace data sent through the serial port by controlling simultaneously the buttons

    Hello

    I want to plot data by controlling the two buttons at the same time and the draw according to my control using communication serial port, but the problem is that the plot on the graph alternates between the two controls his do not change according to my control for example if I move the potentiometres1 / 1000 and button 2 to 4000 replacing these values on the graph I placed a select control, the problem is still not resolved u can help me please thanks in advance

    Regarding

    Samatha


  • How we prevent data lost on the relocation by recovery dvd

    Dear Sir.

    I bought the computer laptop pavalion g6 1002tx

    At that time, I had win 7 OS.

    later another two months, I installed win 10.

    now I want to reinstall Win 7 again because I like more.

    I have the DVD of recovery also for win 7,.

    But the problem is what if I install win 7 with the help of Recovery Dvd my data all important about 500 GB will be lost, because the installation using recovery DVDs will completely make my Matthew in a State factory.

    I don't have any external hard disk, all I have is only a slow internet connection, my laptop and recovery DVDs.

    Offers please how can I reinstall my original win 7 with the help of recovery DVDs without losing even a 1 mb of data.

    You can not. You need a way to backup you current installation.

  • How to save data quickly to the high sampling frequency

    Hi all

    I use a structure of producers and customers to measure and record the data. The sampling rate must be as high as 10 kHz. Given that so much data, it takes a long time before the data is saved. At first, I saved the data in an excel sheet. Then I tried to save it in binary, but it still takes a while to complete save. How can I make the time savings a short circuit?

    Thank you

    The best

    First we will make some corrections to your DAQmx code.  Since you are using continuous sampling, do NOT connect the samples per channel.  Which is actually limiting your buffer.  And there is really no need to define your buffer size either.  It is default to very big, so this isn't a problem as long as you read your data quite often.

    Now your data connection... You simply create a very wide range while acquiring data.  Then, you save the data.  It's actually not through the advantage of using the producer and the consumer.  You should save your data in the loop of the consumer.  It will be elinate need a lot of memory and you save the data to the file while you are buying.

    But, in this case, I say that the producer and the consumer is not even necessary.  Use the DAQmx Configure registration VI.  With this VI, you can tell DAQmx to disseminate all data directly in a PDM file.  You don't have to do anything.  It is by far the best way to save on your DAQ data.

  • How to create data animations on the fly, as SWF but not using SWF

    Hi all

    I used no Flash for several years but has done a bit in the past

    I need to create an animation that pulls in the data and images from an external source. I know how I would do it a few years ago (by exporting a SWF movie that can load in pieces), but these days I need something that will work on all devices.

    Is there another way? Flash produces something different which can accept external data while playing live in a browser (html5 maybe?)

    ID thought to After Effects and render a movie file each time on a server (as it appears that AE can accept scripts and external data)

    What options do we have for this sort of thing these days?

    Thank you very much

    Steve

    Flash pro can publish easeljs html5 and supports directly.  Easeljs (in part, the api preloadjs) contains classes for loading xml and images from json data.

  • How to convert Date months in the database that points to the EBS, DWH not.

    Hi friends,

    We intend to create reports in OBIEE and the Source is EBS. This means that we do not want depends on Datawarehouse and Informatica and OBIApps. Simply create us some reports and that they refer to the EBS database.

    End of test, we took an HR report and it contains under columns:

    Months (Sun)
    Revenue by Division (Fact)
    Average cost per numbers of workforce (Fact)

    In my little survey, we found that the income column is of EBS: GL_BALANCES. And we have configured the base of W_Day_D table in DAC has no column months in EBS (not sure).

    Come to my problem, how can I call the month column in my data base stressed EBS. How to convert the Date months in my database.

    I can deceive me, but someone please look into this... How can I create columns for this exact report of OBI in EBS database instead of DwH.

    Thanks in advance...

    Raghu Jen7782

    Just confused here.

    Hang on, if I get it, you want to create report based on columns of EBS directly then using rt BI applications?

    There is then no question of using the W_DAY_D table then.

    Follow

    As long as you have Date column, you can use DB functions to convert them into months (just use the string SUBSTR to extract the month and the year).
    Create your own query instead of using the tables of BI APPS and try to bring a hybrid product.

    Sorry I'm wrong in the understanding of your needs, if I had properly then do the steps above.

    Mark correct or useful if this can help,

    Kind regards
    Rayan Vieira

  • How to display date aggregates in the reports?

    Hi, I have a report that contains a date of and a date. How can I view all the dates between them in a report. This can clearly be an example. I have a date of: January 1, 2011 and a date: June 5, 2011. I want to display in my report that this output:

    Date from the Date in
    January 1, 2011 January 31, 2011
    February 1, 2011 February 28, 2011
    March 1, 2011 March 31, 2011
    April 1, 2011 April 30, 2011
    May 1, 2011 may 31, 2011
    June 1, 2011 June 5, 2011

    How can I do this? Thank you

    This?

    SELECT ADD_MONTHS(DECODE(LEVEL,1,FM_DT,TRUNC(FM_DT,'MM')),LEVEL-1) FM_DT,
           CASE TO_CHAR(LAST_DAY(ADD_MONTHS(FM_DT,LEVEL-1)),'MM')
           WHEN TO_CHAR(TO_DT,'MM') THEN
           TO_DT
           ELSE
           LAST_DAY(ADD_MONTHS(FM_DT,LEVEL-1))
           END TO_DT
    FROM
    (
    SELECT TO_DATE('28-JAN-2011','DD-MON-YYYY') FM_DT, TO_DATE('31-DEC-2011','DD-MON-YYYY') TO_DT
    FROM DUAL
    )
    CONNECT BY LEVEL<=TRUNC(MONTHS_BETWEEN(TRUNC(TO_DT,'MM'),TRUNC(FM_DT,'MM')))+1
    

    -Clément

  • How to get date and time the image was taken by programming?

    Any ideas? Thanks in advance!

    Yes, you can get the date/time of peak clicked using the FileConnection interface

    Press the button Bravo thank the user who has helped you.

    If your problem has been resolved then please mark the thread as "accepted solution".

  • How to get dates based on the difference of startdate and enddate

    Hi all

    I have table with data below:

    I need a new line for each record with enddate-startdate > 41 days.

    For example if Item1, point 2 difference of enddate-startdateis < 41 if these lines are is

    AgendaItem_DescrSTARTDATEENDDATE
    1Point 1OCTOBER 16, 2014JANUARY 4, 2015
    2Point 2OCTOBER 16, 2014JANUARY 4, 2015

    Item3 and Item4 difference is 41 days > and < 82 days so I need two lines as below for each element:

    AgendaItem_DescrSTARTDATEENDDATE
    3Point 3OCTOBER 16, 201416 OCT-2014 + 41
    3Point 316 OCT-2014 + 41 + 1JANUARY 4, 2015
    4Point 4OCTOBER 16, 201416 OCT-2014 + 41
    4Point 416 OCT-2014 + 41 + 1JANUARY 4, 2015

    For Item5 difference is > 41, 82, 123, and < 164 so I need total four lines as below:

    AgendaItem_DescrSTARTDATEENDDATE
    5Point 5OCTOBER 16, 201416 OCT-2014 + 41
    5Point 516 OCT-2014 + 41 + 116 OCT-2014 + 41 41
    5Point 516 OCT-2014 + 41 + 41 + 116 OCT-2014-41-41-41
    5Point 516 OCT-2014 + 41 + 41 + 41 + 1MARCH 21, 2014

    Am able to get the number of rows, but struggling to get the dates as shown:

    Am trying to query is:

      SELECT NV.*,
               ENDDATE - STARTDATE,
               LEVEL,
               FLOOR ( (ENDDATE - STARTDATE) / 41)           
          FROM NSK_VALUES NV
    CONNECT BY     LEVEL <= FLOOR ( (ENDDATE - STARTDATE) / 41) + 1
               AND ROWID = PRIOR ROWID
               AND PRIOR SYS_GUID () IS NOT NULL;
    

    something like that...

    WITH nsk_values (item, item_descr, startdate, enddate)

    AS (SELECT 1, ' 1 ', SYSDATE, SYSDATE + double UNION ALL 7 ')

    SELECT 2, 'point 2', SYSDATE, SYSDATE + 14 IN double UNION ALL

    SELECT 3, 'Item 3, SYSDATE, SYSDATE + 80 IN dual UNION ALL"

    Select OPTION 4, "article 4, SYSDATE, SYSDATE + 56 OF double UNION ALL"

    SELECT 5, 'article 5 "(, SYSDATE, SYSDATE + 156 FROM dual)

    SELECT the item

    item_descr

    largest (startdate, CASE

    WHEN LEVEL > 1 THEN startdate + (LEVEL - 1) * 41 + 1

    Of ANOTHER startdate

    END

    ) As startdate

    , less (enddate, startdate + (LEVEL * 41)) AS enddate

    OF nsk_values

    CONNECT BY PRIOR point = item

    AND PRIOR sys_guid() IS NOT NULL

    and level<= ceil((enddate="" -="" startdate)="">

    /

    HTH

  • How to convert Date format in the Apex?

    Hi all

    I created an element of Apex Date Picker as "yyyy-mm-dd", now when they select this date picker, that must be converted in "day, month, DD, YYYY".
    I trired like that but it does not work, can anyone help me to find things to do.

    Under article, we have free will.

    Default value: to_char (to_date (: P1_ENG_DATE, 'dd-mm-yyyy'), ' day, month DD, YYYY ")
    Deafult value as type - PL/Sql.

    Thanks,
    David...

    Hello

    You can set the date format level of application, then you don't need to specify the format each time.

    for this go to "Modify the Application Properties"-> globalization

    Here you can specify the format of date of application.

    Thank you
    Tauceef

Maybe you are looking for

  • Drop 2 Vault and Bootcamp Will it mess up my mac?

    Hello. I am wanting to encrypt my Mac player with vault2 fault I need to install bootcamp before or after completing the installation of windows? Thank you very much.

  • Unaible to connect by WiFi or bluetooth Ipad and Iphone 5 s

    Hello guys,. I can't connect my 5S for my Ipad iPhone (generation 3) WiFi + cell. Or with WiFi or Bluetooth, I need for my presentation power point, any help? Thank you. I already checked the bluetooth of so much work and even wi - fi of the two.

  • Mouse Lenovo N700 will not pair

    I just got this new mouse and it all works in radio with the dongle wireless mode, it will pair not via Bluetooth. I am running Windows 8.1 on a Lenovo Yoga 11 with Bluetooth 4.0. I prefer not to use the dongle of course. Why do I a driver error tryi

  • Importing video Windows Movie Maker

    I try to import clips converted to mpeg4 to wmv with Freemake Video Converter, but every time I drag the clip in the timeline or storyboard table of the project stops and when I reopen it clips have disappeared. Can anyone help? At soon Hurtledog

  • IE8 restart computer when you press alt to menu

    IE8 is set to not show the menu bar. Now when I press Alt to display the menu bar or I right click on the bar area and click on the bar of Yvan to put the brake support this action restarts the computer each time. I looked for solutions and tried to