How to check/verify running sql in lib cache is using updated statistics of table

How to check/verify running sql in lib cache is using updated statistics of table used in from clause.
one of my application table is highly busy i.e frequent update/insert/delete.
we gather table stats every 30 min.

Hello, "try dynamic sampling" = think "outside the box", maybe hit two birds with same stone.
As a matter of fact, I was just backing up your statement: "30 minutes seems pretty extreme"
cheers

Similar Messages

  • How to check apache pl/sql listener port

    hai
    can any tell me how to check apache pl/sql listener port
    Thanks
    BhanuChander

    You may get it by searching the portlist.ini file in the ORACLE_HOME of the product you use.....
    So , for instance the following , are the ports those of Dev_Suite_Home:
    Oracle Developer Suite HTTP port = 8889
    Oracle Developer Suite JMS port = 9240
    Oracle Developer Suite RMI port = 23910
    Oracle HTTP Server Diagnostic port = 7200
    Reports Services bridge port = 14011
    Reports Services discoveryService port = 14021But ... note that these ports are valid only at the time of installation....!!!!
    Greetings...
    Sim

  • How to check  if all values from a dataset  has come to  an internal table

    How to check  if all values from a dataset  has come to  an internal table ?

    Hi,
    After OPEN DATASET statement check if sy-subrc = 0 if its success then proceed with split statement and save the dataset values into a internal table and while debugging the internal table you will find that whether all values get into internal table.
    Checking sy-subrc after OPEN DATASET statement is must to fill up the values in the internal table.
    For e.g.
    OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        WRITE :/ 'No such input file' .
        EXIT.
      ELSE.
    READ DATASET p_inpfile INTO loc_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            CLEAR loc2.
    *Spliting fields in the file-
            REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
           SPLIT wa_string AT const INTO loc2-pernr
                                           loc2-werks
                                           loc2-persk 
                                           loc2-vdsk1.
    Hope you get some idea.
    Thanks,
    Sakthi C

  • How to compile and run java files on a mac using command line?

    can someone tell me or link me to some article on how to compile and run java files from command line on a mac? I have mac OS X leopard

    What do you mean by "where to put them" ? What do you want to put anywhere ?
    Have you read Peter's comment in brackets ? Perhaps you have a classpath problem ?
    Edited by: Michael_Knight on Aug 31, 2008 4:23 AM

  • How to check Whether the File is in Progress or used by some other resource

    Hi All,
    I am retrieving a file from the FTP server using Apache commons FTP.
    I need to check whether the file is fully retrieved or in progress.
    for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
    How to check whether the file is in progress ? or The file is accessed by some other resource ?
    Pls Help me.
    Thanks,
    J.Kathir

    Hi Vamsi,
    Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
    In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
    The file adapter will wait for its turn and then write the files.
    Regards
    joel
    Edited by: joel trinidade on Jun 26, 2009 11:06 AM

  • How do I get the iTunes store to pull and use updated info from Gracenote?

    I'm helping a music group fix their CD information, which was incorrect in the Gracenote database. Gracenote made the corrections, but the iTunes store is not reflecting the changes. I verified the changes were made by inserting the CD on a PC, and, through the iTunes client, asking it to pull the track info from Gracenote. The info is correct.
    However, if you use the iTunes client to go to the store, the info in the store does not match what was pulled when sticking the CD in the drive and querying Gracenote. Also, if you go to the CD URL via a web browser to preview or purchase a digital download, the iTunes store web site is still showing the wrong information.
    How do I get the iTunes store (that is, Apple's server, not the iTunes client) to pull and use updated (correct) CD information from Gracenote?

    Geek Girl,
    The official Content Provider relationship with the Store depends how it was set up, and may be the group or their agent or a 3rd party such as TuneCore.  They can go back through the same official channel that put the tracks in the Store in the first place.
    Or, if it is simply an error, as opposed to an official change by the Artist, you can try the Feedback page:
    http://www.apple.com/feedback/itunesapp.html

  • SQL 2008 R2 Best Practices for Updating Statistics for a 1.5 TB VLDB

    We currently have a ~1.5 TB VLDB (SQL 2008 R2) that services both OLTP and DSS workloads pretty much on a 24x7x365 basis. For many years we have been updating statistics (full scan- 100% sample size) for this VLDB once a week on the weekend, which
    is currently taking up to 30 hours to complete.
    Somewhat recently we have been experiencing intermitent issues while statistics are being updated, which I doubt is just a coincidence. I'd like to understand exactly why the process of updating statistics can cause these issues (timeouts/errors). My theory
    is that the optimizer is forced to choose an inferior execution plan while the needed statistics are in "limbo" (stuck between the "old" and the "new"), but that is again just a theory. I'm somewhat surprised that the "old" statistics couldn't continue to
    get used while the new/current statistics are being generated (like the process for rebuilding indexes online), but I don't know all the facts behind this mechanism yet so that may not even apply here.
    I understand that we have the option of reducing the sample percentage/size for updating statistics, which is currently set at 100% (full scan).  Reducing the sample percentage/size for updating statistics will reduce the total processing time, but
    it's also my understanding that doing so will leave the optimizer with less than optimal statistics for choosing the best execution plans. This seems to be a classic case of not being able to have one’s cake and eat it too.
    So in a nutshell I'm looking to fully understand why the process of updating statistics can cause access issues and I'm also looking for best practices in general for updating statistics of such a VLDB. Thanks in advance.
    Bill Thacker

    I'm with you. Yikes is exactly right with regard to suspending all index optimizations for so long. I'll probably start a separate forum thread about that in the near future, but for now lets stick to the best practices for updating statistics.
    I'm a little disappointed that multiple people haven't already chimed in about this and offered up some viable solutions. Like I said previously, I can't be the first person in need of such a thing. This database has 552 tables with a whole lot more statistics
    objects than that associated with those tables. The metadata has to be there for determining which statistics objects can go (not utilized much if at all so delete them- also produce an actual script to delete the useless ones identified) and what
    the proper sample percentage/size should be for updating the remaining, utilized statistics (again, also produce a script that can be used for executing the appropriate update statistics commands for each table based on cardinality).
    The above solution would be much more ideal IMO than just issuing a single update statistics command that samples the same percentage/size for every table (e.g. 10%). That's what we're doing today at 100% (full scan).
    Come on SQL Server Community. Show me some love :)
    Bill Thacker

  • How to check whether java.sql.Connection has been dropped or not

    Hi,
    How can i check whether the connection is dropped from the database or not by using java.sql.Connection API.
    Thanks

    There's a few ways to check Connections, each with a different use:
    (1) conn.isOpen()
    (2) conn == null
    (3) the last one is a little more involved and adds some overhead. You can run SELECT 1 FROM dual; (Oracle) or SELECT 1 (MSSQL) and check for exceptions.
    The only way to check a connection, as far as I know, is to use it. That said, there must be a better way???

  • How to check apps running in background?

    Hello Folks,
    - How do I check which apps are running in the background at all times? 
    - How do I stop them from running in the background?
    Thanks

    Read through these links to understand iOS multitasking...
    http://support.apple.com/kb/ht4211
    http://speirs.org/blog/2012/1/2/misconceptions-about-ios-multitasking.html
    http://www.macworld.com/article/1164616/how_ios_multitasking_really_works.html
    http://whenwillapple.com/blog/2010/04/19/iphone-os-4-multitasking-explained-agai n/
    Note that the vast majority of apps do not run in the background.  What you see in the tray after double-clicking the Home button are recently used apps.

  • How can I verify SBO SQL DB was damaged.

    Dear All,
    During last months 3 old customer followed from other SAP Business One Partner ask to become our Customer.
    I'm very happy to follow new customer but I'm not so sure that their DB are not damaged from old direct Update/Insert DB.
    SAP  raccomandation are very drastic .... see SAP Note Number: 631504.
    Do you know an utility that can help me to verify SAP Business One DB old damaging?
    Maurizio Fratini
    SAI Srl

    Hi Maurizio,
    I don't think there's a way that you can be absolutely sure that no direct SQL updates have been done (unless you have the entire set of transaction log backups from the SQL Server and a way to search this for direct SQL statements). You can compare the history tables to the current data (eg compare ACRD to OCRD) but only if the client has the logging enabled (it's set in Company Details). Even with the logging, there are some tables which cannot be checked in this way as they don't have a history table.
    You could also contact SAP support to see if they have any advice.
    Kind Regards,
    Owen

  • How to run SQL script file on Linux using Java ?

    Hi,
    I need to execute .sql file using java. I used following approach for this.
    private void runScriptEvent(java.awt.event.ActionEvent evt) {                               
            String sqlOutput = "";
            String sqlPromptLines="";
            String currentFunctionName = "";
            if(con!=null){
                String userName = jTextField4.getText();
                String password = jPasswordField1.getText();
                String databaseName = jTextField3.getText();
                try {
                    String script_location = "";
                    ProcessBuilder processBuilder =null;
                    Process process = null;
                    //File file = new File("C:/ScriptFile");
                    File file = new File("./SQL_Script");
                    //File file = new File("E:\\install\\SQL_Script");
                    if(file.exists()){
                        File [] list_files= file.listFiles(new FileFilter() {
                                        public boolean accept(File f) {
                                        if (f.getName().toLowerCase().endsWith(".sql"))
                                        return true;
                                        return false;
                    int count = 0;
                        for (int i = 0; i<list_files.length;i++){
                            script_location = "@" + list_files.getAbsolutePath();//ORACLE
    //currentFunctionName = list_files[i].getName();
    StringTokenizer st = new StringTokenizer(list_files[i].getName(), ".");
    while(st.hasMoreTokens()) {
    currentFunctionName = st.nextToken();
    String extention= st.nextToken();
    System.out.println("Function Name = "+currentFunctionName + "\t Extention = " + extention);
    processBuilder = new ProcessBuilder("sqlplus",userName+"/"+password+"@"+databaseName, script_location); //ORACLE
    processBuilder.redirectErrorStream(true);
    process = processBuilder.start();
    BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
    String currentLine = null;
    while ((currentLine = in.readLine()) != null) {
    sqlPromptLines = " "+sqlPromptLines + currentLine +"\n";
    count ++;
    System.out.println(count+" " + currentLine);
    if(currentLine.equalsIgnoreCase("Function created.")){
    sqlOutput = "\n" sqlOutput currentFunctionName + " " currentLine"\n" ;
    break;
    }// end while
    in.close();
    process.destroy();
    }//end for
    }//end if file exists
    } catch (IOException e1) {
    jTextArea1.setText(e1.getMessage());
    System.out.println("Script Done");
    jTextArea1.append(sqlOutput);
    }// end id Connection is not null
    Above code working appropriate on Windows but not on Linux.
    is there any changes needed ?
    Regards,
    Ajay
    Edited by: Ajay Sharma on Nov 21, 2012 6:43 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi gimbal2,
    about code
    jTextArea1.setText(e1.getMessage());I am using this code so that the user will be prompted with a message rather than stack trace.
    About the issue I am getting on linux i believe its because of following statement.
    processBuilder = new ProcessBuilder("sqlplus",userName+"/"+password+"@"+databaseName, script_location); //ORACLERegards,
    Ajay
    Edited by: Ajay Sharma on Nov 23, 2012 12:05 PM
    Edited by: Ajay Sharma on Nov 23, 2012 12:06 PM

  • How to check if an SQL profile is being used or not?

    Hi,
    We have a couple of SQL profiles and outlines in the database. There has been a couple of code changes and it is now difficult to keep track if an SQL profile or an Outline is still being used? Is there any way to find that?
    Thanks in advance

    Find the entry corresponding to the SQL statement you are reviewing in V$SQL. Look at OUTLINE_CATEGORY and SQL_PROFILE columns. NULL indicates that no Outline/Profile was used.

  • How do I check processes running on a windows machine? using java?

    like processes or services.
    is there any way?

    The best thing would be to run the keychain on the older computer and expose the password.
    I recall that some older passwords were not accepted on newer OSs. It was a bug from some years ago, as I recall, based on increased security levels.

  • How to check the given path is existing or not using sp_cmdshell

    Hi All,
       I am passing one path to the stored procedure, before executing code i want to check whether the path is given existing or not .
    By using sp_cmdshell we can know whether files are there are not but in case of my scenario i want to know the directory(folder) is existing or not because the source folder may be blank so it will not get the files there so stored procedure returning the
     File Not found as output.
    following is the code i am trying to retrieve this please suggest any other way to solve it.
    Create table #tableExists  (isValid varchar(255))
    Declare @path varchar(255)='DIR "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA "/B'
    INSERT INTO #tableExists 
    EXEC xp_cmdshell @path
    select * from #tableExists
    Regards,
    Niraj Sevalkar

    You can try the other two undocumented extended stored procedures as well:
    --EXEC master.dbo.xp_subdirs @pathName
    EXEC Master.dbo.xp_fileexist @pathName
    EXEC Master.dbo.xp_DirTree @pathName,1

  • How to check the size of flash memory that are used by each applications ?

    I'm using yxplayer as secondary media player.
    2 weeks ago, this program always fails to start up.
    So, I have uninstalled this program and reinstalled newer version.
    After reinstallation, it works well. But all the video clips that I have
    Copied to this application have gone away... And It seems the
    Flash memory that was used by older version did not returned
    To free space.
    Is there any tool to check the usage of internal flash of ipad in detail ?

    Hi,
    Is there any tool to check the usage of internal flash of ipad in detail ?
    Not memory, but storage space.
    Connect your iPad to your computer. Launch iTunes. Select the Summary tab. Storage space available at the bottom of the iTunes page.
    iOS devices do not support Flash.
    Carolyn

Maybe you are looking for

  • Color correction and "sudo-chroma keying"-can they be done?

    So I just wrapped my cousin's wedding, but the ceremony and reception were both held in a bar, which made for less than optimal conditions. Besides the prolific dim lighting, there were neon signs, specifically Miller and Bud Light. Those signs were

  • Using External LCD as Camera Viewfinder​?

    Has anyone else been wanting this function? I have not seen one thread complaining about how inept the external LCD is. I know that some people consider this a low priority, but it sure would be nice to see yoruself when taking a pic with friends and

  • Physical inventory with and without handling unit managment

    Hello all, I would like to know what is the difference between physical inventory with and without handling unit management. Pl. advise. Thanks, Maxx

  • ZoomIn,ZoomOut problem...

    Hi. I have following problem: addEventListener(MouseEvent.MOUSE_OVER, fl_MouseOverHandler); function fl_MouseOverHandler(event:MouseEvent):void stop(); addEventListener(MouseEvent.MOUSE_OUT, fl_MouseOverHandler_0); function fl_MouseOverHandler_0(even

  • How to import engine.security.facade software component in CE 7.1 SP3

    Hi experts, When I used com.sap.security.api.sda, there is a warning that it has deprecated. However, know that engine.security.facade (public part default) in software component ENGFACADE is the new component, I cannot find it in the CE environment.