How to handle stale Stats script.

Hello
I use Release 10.2.0.1.0 Oracle. I have a scenario where I'm mediocre execution due to obsolete statistics plans, and how do I address the scenario. Here's the part of my main request which deviates the path of execution by the bad cardinality estimate.
 
      My column c1 of table tab1 holds javatimestamp values i.e. its NUMBER datatype which points to a date and time component only. And we gather stats each weekend on this table tab1.
      below is my query:
      
      select /*+gather_plan_statistics*/* from tab1          
      where c1 BETWEEN 1346300090668 AND 1346325539486    ;      

Plan hash value: 3167980259

--------------------------------------------------------------------------------------------------------------------------
| Id  | Operation                   | Name                    | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
--------------------------------------------------------------------------------------------------------------------------
|   1 |  TABLE ACCESS BY INDEX ROWID| tab1                    |      1 |   1    |    167K|00:01:13.72 |     158K|  12390 |
|*  2 |   INDEX RANGE SCAN          | IDX_N1                  |      1 |   1    |    167K|00:00:13.27 |   13880 |   1736 |
--------------------------------------------------------------------------------------------------------------------------
      
     Above shows a big gap in actual and estimated cardinality estimation, and its due to the fact that the HIGH_VALUE (1346203206173 points to 8/29/2012 1:20:06 AM) in DBA_TAB_COLUMN for     column C1 is well below  the STARTRANGE(1346300090668 points to 8/30/2012 4:14:51 AM) and ENDRANGE(1346325539486 points to 8/30/2012 11:18:59 AM) of the BETWEEN clause. 
     
     So even gathering stats daily on the table wont help me as because, in morning again it will require updated maxvalue for the column C1 for estimating proper, So how to handle this situation?  Dont want to go with 'hint' , want to make the stats proper so that optimizer will automatically pick the right path.
Published by: 930254 on August 30, 2012 04:41

930254 wrote:
Yes, I think that of the two options as

1. setting the High_value (high_value + 7 days ahead) in weekend work which is used to gather statistics on that table.
2. addition of indication to follow the optimal path.

y at - it of the other alternatives for this scenario? If this isn't the case, which will be advised of the option above?

Published by: 930254 on August 30, 2012 06:46

If you consider the Doms tips as well, theres "a piece of work, you need to make sure that the optimizer always uses the index that it could not properly high_value far out of reach since the last gathering"

What is the best way to do it? Although you seem reluctant to do it, for me, it's the index indicator. You know that the index, it's what you want to use, it's a small change. All the others, although not terrible difficult to implement, need additional jobs in

Tags: Database

Similar Questions

  • How can I resize window "script event handler?

    How can I resize window "script event handler? (I entered in a script long as event handler script. After adding the script, I can't view or scroll key buttons on the right) .attached is a screenshot of the problem I am facing.a.jpg

    Quit photoshop and go to

    For Photoshop CS6

    Photoshop CS6 Photoshop C:\Users\Your Name\AppData\Roaming\Adobe\Adobe CS6\Adobe settings

    For Photoshop CC

    C:\Users\Your Name\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CC settings

    remove the

    Script Manager.xml events

    then restart photoshop


    I think that the events are for something like select menu or tool (filter), and then this, for example.

    For your script, probably add using skip under Script would be preferable.



  • Error, please help me, how to handle this?

    Please help me, how to handle this? 2892 ArgumentException: the parameter: System.Net.Sockets.OverlappedAsyncResult is not valid. Use the object returned by the corresponding asynchronous Begin call. Parameter name: asyncResult: at System.Net.Security._SslStream.EndRead (IAsyncResult asyncResult) at?. (IAsyncResult) at System.Net.LazyAsyncResult.Complete (IntPtr userToken) at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state) to the System.Net.ContextAwareResult.Complete (IntPtr userToken) at System.Net.LazyAsyncResult.ProtectedInvokeCallback (object result, IntPtr userToken) at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback (errorCode, UInt32, UInt32 numBytes, nativeOverlapped NativeOverlapped *) to System.Threading._IOCompletionCallback.PerformIOCompletionCallback (errorCode, UInt32, UInt32 numBytes, NativeOverlapped * pOVERLAP)

    It's not a usual mistake. Despite this, try this link to error.

    https://social.technet.Microsoft.com/search/en-us?query=NET.Sockets%20based.%20overlapped&AC=4#refinementChanges=&PageNumber=1&showMore=false

    Details of youre also treat, try .net cmd, opening type: netsh Winsock reset exit, restart the pc

  • Inactive Contacts - how you handle the?

    We currently have XXX, XXX (there is no way I'm telling you, in fact) of contacts in Eloqua, which is not just whatever be done in a VERY long time. We have recently acquired another company who does not use Eloqua and working on their integration in our system. Now I'm sure that like Eloqua me just buy more space, I work on a project to clean up the deadbeats and leave room for shiny new customers. The program that we run has three points of contact, and if a customer engages in any of the steps they got out the program and will be left in the system. In the last step we let them know that if we do not hear back from them within 10 days, we will assume that they are super busy and we will remove them from our database. Also, we are ignoring those who joined in the last 12 months, because they can always be interested in reading some of our materials and have not gotten yet around him.

    This seems to be an Amir of a program and will surely cause our stats boost then because we send is more people that never open anything.

    How you handle these kinds of people? Do you agree with our approach?

    Absolutely!  It is a perfect process.  In my life earlier as someone who was directly in the marketing of opps, we did this process manually about every 3 months.  Automating this process with a campaign and send to the PB to automatically remove contact looks a perfect nurture automated.

    You can even include the verbiage in the last email, if they "do not" provide this mail they will be removed from the system.

  • Model of how APEX handles data (values)?

    Reference {: identifier of the thread = 2486655}

    I am trying to get a model of how APEX handles data (values). There are several places (?) data (values) that may exist. Or so it seems. I'm trying to understand how these work - to put all the pieces together.

    Question:
    (A) where data can be?
    (1) in the database
    (2) for the session
    (3) rendering - and then displayed on the screen, if a value displayed - but not in the session
    (4) in perhaps (?) a few (?) memory work pool but different from the rendered page of values, I see on the screen?
    (5) other?

    Why I think that it's relevant?
    Question:
    (B) attended the session different from that made, then when the code runs, the values and values that (rendering or session) if he runs against?

    And maybe the answer is, "You don't understand what is happening." Yes, "exactly!" Where the question.

    Best wishes
    Howard

    Hello

    If you like to have 'default value' in session state, use the calculation.
    And as you've noticed, you need to before calculation of the item is made to get the same "default" session state and the screen.

    Kind regards
    Jari
    -----
    My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • How should be written the script for the use of the maximum memory of the guest operating system ever?

    How should be written the script for the use of the maximum memory of the guest operating system ever?

    Please teach the name of the object and the type and order, etc.

    You should be able to do it with the cmdlet Get-Stat .

    Something like that

    Get-Stat -Entity (Get-VM $vmName) -Stat mem.usage.maximum -Start (Get-Date).AddDays(-7) | Measure-Object -Property value -Maximum | Select Maximum
    

    This will return the maximum percentage in the last 7 days for the guests, whose name is stored in the variable $vmName.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • How to handle null values in the RTF models

    Hi - I have two groups in a report for different SQL and two formulas for each group, CF_ELE_CNT and CF_ELE_CNT1. In the model that I used the code to print a section below or not.

    <? If: number (CF_ELE_CNT + CF_ELE_CNT1) > 0? >

    The problem is when no data in the second group it was created not the tag XML for CF_ELE_CNT1, if CF_ELE_CNT has 13, it does not always print this partucular article. If I remove the CF_ELE_CNT1 in the State, it works fine. I was wondering how to handle this.

    Any help would be appreciated!

    Thank you
    RAV

    Hey Rav,.

    Check my profile, you will find.

    purpose of fusion {point} [AT] gmail [dOt] com

  • Error ORA-022887 during the insert operation how to handle correctly...

    Hello everyone I got an error in during the insert operation how to handle correctly?
    SQL statements below.

    INSERT STAFF. TRANSLATIONS (TID, SCRIPT_NAME, TAG, TR, FR, LOCAL)
    VALUES ((SELECT LOCATION. SQX_TID. (NEXTVAL DOUBLE AS TID), 'TEST_TEST', 'TEST', 'TR', 'FR', 'LOCAL');

    Thank you

    Try this,

    INSERT STAFF. TRANSLATIONS (TID, SCRIPT_NAME, TAG, TR, FR, LOCAL)
    VALUES (PERSONAL. SQX_TID. NEXTVAL, 'TEST_TEST', 'TEST', 'TR', 'FR', 'LOCAL');

  • How to handle the no_data_found exception

    Hi all

    How to treat no_data_found exception in the procedure. I created a procedure with the cursor, the cursor loop and passing the value to the select statement (in the where clause). It works fine if the select statement returns one other wise he throws exception no_data_found, but I want to continue execution after the statement select returns no ecor. Please let me know how to handle this.


    Thank you and best regards,
    Rajasekhar

    Hello
    Assuming it's the syntax of your procedure:

    create or replace procedure XXXXXX as
    .
    .
    
    .
    .
    
    for cur_rec in 
    loop
    .
    .
    .
    
    .
    .
    .
    begin
    
    exception
    when no_data_found then
    
    end;
    .
    .
    
    .
    .
    end loop;
    .
    .
    end procedure;
    
  • Subsequently, how the handle portion e-mail spam?

    Subsequently, how the handle portion e-mail spam?

    If your questions have been answered, please mark my answer as your problem so that others who have the same question can find it. Thank you.

  • How to handle the onTriggered many ActionItem created dynamically

    Hi, I created the ActionItem dynamically using (loop)

    because data is from webservice

    How to handle the onTrigerred?

    If my code is like this:

    for (int i = 0; i)< alist.count();="">

    {

    My page page * = iRoot-->findChild ("SpecificObject");
    ActionItem * action = ActionItem::create () .title (aList [i] .name);

    bool res = QObject::connect (action, SIGNAL (triggered ()), this, SLOT (handleAction (())); what I'm confused because I don't know what action is triggered
    Q_ASSERT (res);
    Q_UNUSED (res);

    my page-> addAction (action, ActionBarPlacement:efault);

    }

    MyClass::handleAction() Sub

    {

    aFunction(); This parameter of function required of aList, said user.user aList [i]

    }

    Do I need to create handleAction() as well as added actionItem SLOT

    But I don't know how much action added because it is dynamic server

    Thank you

    There are a few options:

    Create a single location and connect all the signals. You can then call sender() into the slot to retrieve the object that sent the signal and go from there. You can also use a QSignalMap that maps each signal to a value and send this value to a single location. You can also use QSignalMap::sender() to get the sender object.

    I used the QSignalMap to do something similar for handling created dynamically successfully drop-down lists.

  • How to handle the null value

    Hi all

    Can someone tell me how to handle null.

    I have a radio button, I need to capture the worth and inspiring I have a search criterion.

    If I select the radio button without problem. If I did not choose the option button it gives me the error.

    OAMessageRadioButtonBean var1 = (OAMessageRadioButtonBean) webBean.findChildRecursive ("job");
    If (var1! = null)
    {
    S1 = var1.getValue (pageContext) m:System.NET.SocketAddress.ToString ();
    }

    Please suggest.

    Kind regards

    Sangu

    S1 = (String) var1. GetValue (PageContext);

  • How can I use a script to set the variables?

    I have a script to set a few variables and I need to run the script multiple times throughout the form, for different users at different times.  How can I configure the script as an object in the Variables and call it when I need to run it?  Appreciate all help.  I use SS3.

    var emailSubject = "";
    var cleanDate = Page1.EventDetails.Block2.SpeakingDate.rawValue.replace(/[\/]/g, "-");
    var eventName = Page1.EventDetails.Block1.EventName.rawValue;
    var eventCity = Page1.EventDetails.USaddress.CityEvent.rawValue;
    var eventState = Page1.EventDetails.USaddress.StateEvent.rawValue;
    emailSubject = cleanDate + " - " + eventName + " - " + eventCity + " - " + eventState;
    

    To create a function to be able to reuse the code easily right click in your hierarchy (for example, on your "form1"), click "insert a Script object.

    A new script object will be created, just rename it to something appropriate and then create a function both inside and

    function myFunction(var1,var2,var3){
    ' just an example '
    page1.textfield1.rawValue = var1 + var2 + var3
    }
    

    (I didn't fully understand the significance of the date and the event and the city, and exactly what your function is supposed to do, but it's how you declare a function).

    To call this function you simply reference as form1.scriptobjectname.myFunction(123,"asdf",variablename)

    (just one example of the possible arguments).

    I hope that's not too hard to follow,

    Best regards, Mattias

  • can you help me pls?... I don't really know how to handle this Lightroom :D

    can you help me pls?... I don't really know how to handle this Lightroom

    Hi jhanrellg,

    What version of Lightroom do you use?

    What exactly is the problem you are having?

    Please visit the links below to start using Lightroom: -.

    How to use the Lightroom catalogs

    How to add, edit, and synchronize photos in Lightroom | Adobe Photoshop Lightroom CC tutorials

    Let us know if that helps.

    Kind regards

    Assani

  • How to connect a Jot Script 2 stylus?

    How to connect a Jot Script 2 stylus? Use iPhone 6 Plus.

    Hi Jack,

    There is no support pen pressure for the iPhone version of Sketch.

    Hope that helps.

    Sue.

Maybe you are looking for

  • Re: locked out of my hp mini

    You can help me too?CNU9382TT3HP MINIWIndows 7 UltimateThank youJessica

  • HP-15ac149tx: not found some drivers.

    Hello I need drivers for integrated 10/100base-t ethernet lan driver win7 x 64 bit I have the computer hp laptop 15ac149tx. Mobile and 5th generation core intel × hci-9CB1 usb controller driver are missing also. Help, please.

  • Validity Sensor

    I just got an error a yellow triangle against a validity sensor (WBF) (PID = 0050) when I click to updte it tells me that the best version is already installed. I have a HP Envy laptop running Windows 8.1

  • Intelligent question Clone

    Hi, I use the plugin vcenter vsm 3.5 to clone a single virtual machine, the plugin clone makes the data store the entire virtual machine residing in and if I have any amble amount of free space on the LUN the smart operation clone will fail, is it po

  • BlackBerry 10 Passport BlackBerry design

    Good day to the http://supportforums.blackberry.com/ community