Query timing study

Hello,
I'm using the following Oracle version.
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
I'm trying to understand how long a certain query takes to return data. I'm saw that on the first execution in Toad, the query took 2 minutes to run. On each subsequent exection, the query took < 1 second to return a result. I understand that the result gets stored after the first execution. But, how would I be able to prevent it from storing the result set? Or, is there a way to reset it each time?

arizona9952 wrote:
Hello,
I'm using the following Oracle version.
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
I'm trying to understand how long a certain query takes to return data. I'm saw that on the first execution in Toad, the query took 2 minutes to run. On each subsequent exection, the query took < 1 second to return a result. I understand that the result gets stored after the first execution. But, how would I be able to prevent it from storing the result set? Or, is there a way to reset it each time?most likely the first time the data blocks are being read from disk.
After that the block already exist in the SGA.
a brute force "solution" that affects all SQL would be to FLUSH the SGA

Similar Messages

  • While Starting Addon - Getting message "Addon Query Timed Out"

    Hi All,
    In the "AddOn Manager" Screen, when i am clicking the "START" button to start my AddOn, after some time it is giving me a message "AddOn Query Timed Out" and setting the status as "Failed", though it has started my AddOn and its working without any problem, but since it has status "Failed" it keeps the "Stop" button disabled, hence i am unable to stop my addon.
    Immediate Response is needed.
    Thanks in Advance.

    Search the forum: this question has been answered many times. See Re: Reg . AddOn Timeout Message is comming but AddOn is still working.

  • Collection: (80004005) Execute: Query timed-out

    Hi,
    Recent days im facing a strange issue like the SCCM clients are not reporting the full Software inventory, so because of that we were unable to query using the software inventory details.
    The strange part is, while checking the logs "Inventory agent.log" it states "Collection: (80004005) Execute: Query timed-out".
    I wanna find what is the job of the Software inventory cycle and how to see at what point they stuck scanning...
    Any information helping me to proceed further with my investigation would be much appreciated.
    Thanks,
    Nana

    Thanks for the link Garth...
    We have scheduled software inventory to run on Sundays so that it should not impact client PC's performance. I agree it takes long time, but at some point we might require some information from those files. I also tried to create few test machine, but its difficult
    to duplicate this issue in them. Whenever we create a new machine, it reports good :(
    I was querying the machines who has collected "powershell.exe" files using software inventory cycle, i was able to fetch about 91% of the machines where as 9% has not. I tried to run a powershell query (Full software inventory) remotely on the machine where
    we are facing issues collecting software inventory. Monitoring the logs and i came up with this error.
    Here my question would be as its working on most of the machines why aren't they good on the rest. Even if we try to re-install the client, same status. Maybe because of the machine performance?
    Thanks for your help...

  • PL/SQL - subsecond query timing

    I am trying to time how long some SQL statements
    take - the problem is with SYSDATE I can only access
    times down to a whole number of seconds.
    Does anyone know how I can time the execution of
    a command to better than a second?
    eg
    DECLARE
    startDate Date;
    endDate Date;
    v_seconds number;
    v_count number;
    BEGIN
    startDate := SYSDATE;
    SELECT count(*) INTO v_count FROM ...
    endDate := SYSDATE;
    v_seconds := ( endDate - startDate ) * 24 * 60 * 60;
    dbms_output.put_line('Time to complete query is '||to_char
    (v_seconds,'99999.99999'));
    END;
    regards
    Simon

    David,
    SET TIMING ON only works when in interactive mode
    or for a whole PL/SQL block. You can't use it within
    a pl/sql block.
    Gints,
    Thanks - I couldn't find this function in Oracle help! Just
    what I wanted (I didn't want to get into dynamic explain
    plan / sql tracing to get the total execution time of my
    query as against parse, fetch etc times).
    regards
    Simon

  • OutOfMemory error while executing sql query

    Hello!
    My program gets multiple datas from database in every ten minutes, and stores them in memory for hundreds of users, requesting datas via web-interface simoultaneously.
    I dont have access to change database structures, write stored procedures, etc, just read from db.
    There is a table in database with lot of million rows, and sometimes when I try to execute a SELECT on this table it takes minutes to get back the result.
    To avoid waiting for database server for a long time, I set querytimeout to 30 seconds.
    If the server throws back the execution with Query Timed out Exception, I want to 'forget' this data, and 0 value is acceptable because of fast run is more important. So I put the boolean broken variable to check if there is any problem with db server.
    The size of the used memory is about 150Mb if things going well, but I set the max heap to 512 MB, just in case anything happens.
    I'm logging all threads stacktrace, and free/used/allocated memory size in every 5 seconds.(threadwatching.log) 2.appendix
    Sometimes, not in every case (I dont know what is this depends on), when I get the next phase of refreshing cached datas (you can see it below), the process reaches the fiorst checkpoint (signed in code below), starts to execute the sql query, and never reaches the second checkpoint , but used memory growing 50-60 Mb-os in every 5 seconds, as I can see in threadwatching.log until it reaches the max memory and throws OutOfMemory error: java heap space.
    I'm using DbConnectionBroker for connection pooling, SQLCommandBean for handling Statements, PreparedStatements, etc, and jTDS jdbc connector.
    SQLCommandBean closes statements, resultsets, so these objects doesnt stays open.
    I cant figured out what causes the memory leak, if someone have an idea, please help me.
    1. Part of the cached data refreshing (DataFactory.createPCVPPMforSiemens()):
            PCVElement element = new PCVElement(m, ProcessControlView.PPM);
            String s = DateTime.getDate(interval.getStartDate());
            boolean broken=false;
            int value = 0;
            for (int j = 0; j < 48; j++) {
                try {
                    if (!broken) {
                        d1 = DateTime.getDate(new Date(start + ((j + 1) * 600000)));
                        sqlBean = new SQLCommandBean();
                        conn = broker.getConnection();
                        sqlBean.setConnection(conn);
                        sqlBean.setQueryTimeOut(30);
                        System.out.println(DateTime.getDate(new Date())+" "+m.getName()+"   "+j);// first checkpoint
                        value = SiemensWorks.getPCVPPM(sqlBean, statId, s, d1);
                        System.out.println(DateTime.getDate(new Date())+" "+m.getName()+"   "+j);// second checkpoint
                    } else value=0;
                } catch (Exception ex) {
                    System.out.println("ERROR: DataFactory.createPCVPPMforSiemens 1 :" + ex.getMessage());
                    ex.printStackTrace();
                    value = 0;
                    broken=true;
                } finally {
                    try {
                        broker.freeConnection(conn);
                    } catch (Exception ex) {}
                element.getAvgValues()[j] = value;
            }2. SiemensWorks.getPCVPPM()
        public static int getPCVPPM(SQLCommandBean sqlBean,int statID,String start,String end)
                throws SQLException, UnsupportedTypeException, NoSuchColumnException {
            sqlBean.setSqlValue(SiemensSQL.PCV_PPM);
            Vector values=new Vector();
            values.add(new StringValue(statID+""));
            values.add(new StringValue(start));
            values.add(new StringValue(end));
            sqlBean.setValues(values);
            Vector rows=sqlBean.executeQuery();
            if (rows==null || rows.size()==0) return 0;
            Row row=(Row)rows.firstElement();
            try {
                float ret=Float.parseFloat(row.getString(1));
                if (ret<=0) ret=0;
                return Math.round(ret);
            } catch (Exception ex) {
                return 0;
        }3. Part of Threadwatching.log
    2006-10-13 16:46:56 Name: SMT Refreshing Threads
    2006-10-13 16:46:56 Thread count: 4
    2006-10-13 16:46:56 Active count: 4
    2006-10-13 16:46:56 Active group count: 0
    2006-10-13 16:46:56 Daemon: false
    2006-10-13 16:46:56 Priority: 5
    2006-10-13 16:46:57 Free memory: 192,228,944 bytes
    2006-10-13 16:46:57 Max memory: 332,988,416 bytes
    2006-10-13 16:46:57 Memory in use: 140,759,472 bytes
    2006-10-13 16:46:57 ---------------------------------
    2006-10-13 16:46:57 0. Name: CachedLayerTimer
    2006-10-13 16:46:57 0. Id: 19
    2006-10-13 16:46:57 0. Priority: 5
    2006-10-13 16:46:57 0. Parent: SMT Refreshing Threads
    2006-10-13 16:46:57 0. State: RUNNABLE
    2006-10-13 16:46:57 0. Alive: true
    2006-10-13 16:46:57 java.io.FileOutputStream.close0(Native Method)
    2006-10-13 16:46:57 java.io.FileOutputStream.close(Unknown Source)
    2006-10-13 16:46:57 sun.nio.cs.StreamEncoder$CharsetSE.implClose(Unknown Source)
    2006-10-13 16:46:57 sun.nio.cs.StreamEncoder.close(Unknown Source)
    2006-10-13 16:46:57 java.io.OutputStreamWriter.close(Unknown Source)
    2006-10-13 16:46:57 xcompany.smtmonitor.chart.ChartCreator.createChart(ChartCreator.java:663)
    2006-10-13 16:46:57 xcompany.smtmonitor.chart.ChartCreator.create(ChartCreator.java:441)
    2006-10-13 16:46:57 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:463)
    2006-10-13 16:46:57 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:46:57 java.util.TimerThread.run(Unknown Source)
    Software runs well until I get the DataFactory.createPCVPPMforSiemens function in my code ->
    2006-10-13 16:47:01 Name: SMT Refreshing Threads
    2006-10-13 16:47:01 Thread count: 4
    2006-10-13 16:47:01 Active count: 4
    2006-10-13 16:47:01 Active group count: 0
    2006-10-13 16:47:01 Daemon: false
    2006-10-13 16:47:01 Priority: 5
    2006-10-13 16:47:02 Free memory: 189,253,304 bytes
    2006-10-13 16:47:02 Max memory: 332,988,416 bytes
    2006-10-13 16:47:02 Memory in use: 143,735,112 bytes
    2006-10-13 16:47:02 ---------------------------------
    2006-10-13 16:47:02 0. Name: CachedLayerTimer
    2006-10-13 16:47:02 0. Id: 19
    2006-10-13 16:47:02 0. Priority: 5
    2006-10-13 16:47:02 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:02 0. State: RUNNABLE
    2006-10-13 16:47:02 0. Alive: true
    2006-10-13 16:47:02 java.util.LinkedList$ListItr.previous(Unknown Source)
    2006-10-13 16:47:02 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:174)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:02 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:02 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:02 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:02 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:06 Name: SMT Refreshing Threads
    2006-10-13 16:47:06 Thread count: 4
    2006-10-13 16:47:06 Active count: 4
    2006-10-13 16:47:06 Active group count: 0
    2006-10-13 16:47:06 Daemon: false
    2006-10-13 16:47:06 Priority: 5
    2006-10-13 16:47:08 Free memory: 127,428,192 bytes
    2006-10-13 16:47:08 Max memory: 332,988,416 bytes
    2006-10-13 16:47:08 Memory in use: 205,560,224 bytes
    2006-10-13 16:47:08 ---------------------------------
    2006-10-13 16:47:08 0. Name: CachedLayerTimer
    2006-10-13 16:47:08 0. Id: 19
    2006-10-13 16:47:08 0. Priority: 5
    2006-10-13 16:47:08 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:08 0. State: RUNNABLE
    2006-10-13 16:47:08 0. Alive: true
    2006-10-13 16:47:08 java.util.LinkedList$ListItr.previous(Unknown Source)
    2006-10-13 16:47:08 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:174)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:08 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:08 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:08 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:08 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:12 Name: SMT Refreshing Threads
    2006-10-13 16:47:12 Thread count: 4
    2006-10-13 16:47:12 Active count: 4
    2006-10-13 16:47:12 Active group count: 0
    2006-10-13 16:47:12 Daemon: false
    2006-10-13 16:47:12 Priority: 5
    2006-10-13 16:47:15 Free memory: 66,760,208 bytes
    2006-10-13 16:47:15 Max memory: 332,988,416 bytes
    2006-10-13 16:47:15 Memory in use: 266,228,208 bytes
    2006-10-13 16:47:15 ---------------------------------
    2006-10-13 16:47:15 0. Name: CachedLayerTimer
    2006-10-13 16:47:15 0. Id: 19
    2006-10-13 16:47:15 0. Priority: 5
    2006-10-13 16:47:15 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:15 0. State: RUNNABLE
    2006-10-13 16:47:15 0. Alive: true
    2006-10-13 16:47:15 java.util.LinkedList.addBefore(Unknown Source)
    2006-10-13 16:47:15 java.util.LinkedList.access$300(Unknown Source)
    2006-10-13 16:47:15 java.util.LinkedList$ListItr.add(Unknown Source)
    2006-10-13 16:47:15 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:175)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:15 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:15 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:15 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:15 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:17 Name: SMT Refreshing Threads
    2006-10-13 16:47:17 Thread count: 4
    2006-10-13 16:47:17 Active count: 4
    2006-10-13 16:47:17 Active group count: 0
    2006-10-13 16:47:17 Daemon: false
    2006-10-13 16:47:17 Priority: 5
    2006-10-13 16:47:20 Free memory: 23,232,496 bytes
    2006-10-13 16:47:20 Max memory: 332,988,416 bytes
    2006-10-13 16:47:20 Memory in use: 309,755,920 bytes
    2006-10-13 16:47:20 ---------------------------------
    2006-10-13 16:47:20 0. Name: CachedLayerTimer
    2006-10-13 16:47:20 0. Id: 19
    2006-10-13 16:47:20 0. Priority: 5
    2006-10-13 16:47:20 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:20 0. State: RUNNABLE
    2006-10-13 16:47:20 0. Alive: true
    2006-10-13 16:47:20 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:171)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:20 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:20 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:20 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:20 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:23 Name: SMT Refreshing Threads
    2006-10-13 16:47:23 Thread count: 4
    2006-10-13 16:47:23 Active count: 4
    2006-10-13 16:47:23 Active group count: 0
    2006-10-13 16:47:23 Daemon: false
    2006-10-13 16:47:23 Priority: 5
    2006-10-13 16:47:26 Free memory: 4,907,336 bytes
    2006-10-13 16:47:26 Max memory: 332,988,416 bytes
    2006-10-13 16:47:26 Memory in use: 328,083,768 bytes
    2006-10-13 16:47:26 ---------------------------------
    2006-10-13 16:47:26 0. Name: CachedLayerTimer
    2006-10-13 16:47:26 0. Id: 19
    2006-10-13 16:47:26 0. Priority: 5
    2006-10-13 16:47:26 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:26 0. State: RUNNABLE
    2006-10-13 16:47:26 0. Alive: true
    2006-10-13 16:47:26 java.util.LinkedList.addBefore(Unknown Source)
    2006-10-13 16:47:26 java.util.LinkedList.access$300(Unknown Source)
    2006-10-13 16:47:26 java.util.LinkedList$ListItr.add(Unknown Source)
    2006-10-13 16:47:26 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:175)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:26 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:26 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:26 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:26 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:35 Name: SMT Refreshing Threads
    2006-10-13 16:47:37 Thread count: 4
    2006-10-13 16:47:38 Active count: 4
    2006-10-13 16:47:38 Active group count: 0
    2006-10-13 16:47:38 Daemon: false
    2006-10-13 16:47:38 Priority: 5
    2006-10-13 16:47:42 Free memory: 35,316,120 bytes
    2006-10-13 16:47:42 Max memory: 332,988,416 bytes
    2006-10-13 16:47:42 Memory in use: 297,672,296 bytes
    2006-10-13 16:47:42 ---------------------------------
    2006-10-13 16:47:42 0. Name: CachedLayerTimer
    2006-10-13 16:47:42 0. Id: 19
    2006-10-13 16:47:42 0. Priority: 5
    2006-10-13 16:47:42 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:42 0. State: TIMED_WAITING
    2006-10-13 16:47:42 0. Alive: true
    2006-10-13 16:47:42 java.lang.Object.wait(Native Method)
    2006-10-13 16:47:42 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:42 java.util.TimerThread.run(Unknown Source)
    4. Tomcat default logging file:
    2006-10-13 16:47:36 ERROR CachedLayerRefreshenerTask: external error: Java heap space
    5. DbConnectionBroker (connection pooling) logging file:
    Handing out connection 1 --> 10/13/2006 04:47:01 PM
    Handing out connection 0 --> 10/13/2006 04:47:01 PM
    Handing out connection 1 --> 10/13/2006 04:47:01 PM
    Handing out connection 0 --> 10/13/2006 04:47:02 PM
    Warning. Connection 0 in use for 3141 ms
    Warning. Connection 0 in use for 24891 ms
    ----> Error: Could not free connection!!!
    I would appreciate for any help.

    What does your query bring back from this table?This is the query:
    SELECT case sum(c.picked) when 0 then 0 else
    ((sum(c.picked)-(sum(c.picked)-(sum(c.vacuum)+sum(c.id
    ent))))*cast((1000000/cast(sum(c.picked) as float))
    as bigint)) end as PPM
    FROM sip_comp c
    LEFT JOIN sip_pcb pc ON pc.id=c.pcbid
    LEFT JOIN sip_period p on p.id=pc.periodid
    WHERE p.stationid=? AND pc.time BETWEEN ? AND ?Has anybody who knows SQL tried EXPLAIN PLAN to optimize this table? You're joining on a table with a million rows and you're wondering why the performance is poor?
    What is the index situation with these tables?
    .> When I execute it from query manager, it takes from 1
    to 60 secs depend on servers availability. So how will that be any different for JDBC and Java?
    ..> You're right. Thats why I am here.
    What I mean by that is we can't read minds, either. You need to get some hard data to tell you where the bottleneck is. Asking at a forum won't help.
    But tell me, if the java process enters to this query
    execution, and doesnt quit until OOM thrown, how can
    be the problem in caching?I was guessing about caching, because I didn't know what the query was.
    You expect a lot.
    .> No.
    Then how do you ever expect to solve this?
    I tried YourKit Profiler at home, where I'm
    developing software, but this OOM never thrown here,
    even if I have the same database size.Then you aren't replicating the problem. You have to run it on the system that has the problem if you're going to solve it.
    YourKit isn't an industry leader. How well do you know how to use it?
    It just happened at the company where the system
    runs, and I cannot run this profiler there because
    the PC where my tomcat runs dramatically slowed.You have to run something to figure out what the problem is. What about Log4J, some trace logging statements and a batch job to harvest the log?
    Bottom line: you've got to be a scientist and get some real data. We can theorize all we want here, but that won't get you to a solution.
    %

  • Data Federator - Read timed out

    Hi,
    I'm using Data Federator XI 3.0 SP2. I have a datasource connecting to a web service. The web service may return take a long time to do heavy processing, etc., before returning any data. If I call the web service via Data Federator, I will get the following error
    Exception was thrown while executing a query on Data Federator Query Server.
      An exception occurred when querying Data Federator Query Server.
        [Data Federator Driver][Server]
    [Wrapper /TEST/sysadmin/sources/draft/ReturnInputAsOutput]HTTP input/output exception: Read timed out
          [Wrapper /TEST/sysadmin/sources/draft/ReturnInputAsOutput]HTTP input/output exception: Read timed out
            [Wrapper /TEST/sysadmin/sources/draft/ReturnInputAsOutput]HTTP input/output exception: Read timed out
              HTTP input/output exception: Read timed out
    I'm guessing that the Data Federator query timed out because the web service takes a long time to response, is it not? If this is the case, how do I increase timeout value? If this is not the case, then what does the error mean and how do I resolve it?
    Thanks.
    Edited by: Chih Hui Wan on Nov 19, 2009 9:15 AM

    Hi Dayanand,
    For testing purpose, I created a small simple web service with only one operation that sleep for more than two minutes before returning a string. I called this web service operation from Data Federator. After waiting for a while, I got the "Read timed out" error
    Regards,
    Chih Hui

  • Measuring query execution speed

    Is there a way to measure how long it takes to execute a query? I have tried recording the time just before and after a call to execute() but this is not giving usable results as it depends on so many other things. What I am after is some sort of database independent query timing ability. Is it possible in JDBC?
    Thanks,
    -JT

    Using JAMon I time all my jdbc and also how long each individual query takes. Got to http://www.fdsapi.com and go to the live demo. This allows you to enter queries adn then go to the JAMonAdmin page and you will see a sortable html report that allows you to view the statistics.
    JAMon is flexible due to the fact it just takes a String. That string can represent anything such as a specific query (in sybase for example a stored proc), a page hit, a method call or anything else that makes sense to you. It is a simple stopwatch based API that couldn't be easier to use. Simply import the jar and call start() and stop(). What's nice about this it is flexible enough to monitor more in your app than queries, such as jsp pages, and it is fast enough to run in production.
    There is a servlet filter at the site that keeps stats for any pages within your web site and you don't have to do any code to get this capability. JAMon keeps track of hits, avg time, max time, min time, concurrency and scalability.
    // Note it is a simple 2 method api.  Every time this metho is called new aggregate stats will be gathered, and displayed via JAMonAdmin.jsp
    public List getEmployee(String empID) {
      Monitor mon=MonitorFactory.start("com.mypackage.Employee.getEmployee");
       try {
           ....my code...
        } finally {
          mon.stop();
    }steve - http://www.jamonapi.com - a performance tuning API
    http://www.fdsapi.com - a simple api for generating xml and html

  • Safari causing full-system hang

    For a while now I've been getting the SBOD irregularly in Safari, since 3.x if I remember right. I've got some time off work at the minute so I'm finally looking into this properly, and here's what I've found:
    There seems to be two separate conditions. The first happens on loading some, but not all web pages, causes a lengthy hang in which the entire system (even invoking Dashboard or Spaces) becomes unresponsive. In the console this accompanied by an entry similar to the following:
    05/10/2010 08:15:47 /Applications/Safari.app/Contents/MacOS/Safari[242] ATS AutoActivation: Query timed out. (elapsed 5.0 seconds. params: queryString = {comapple_ats_namepostscript == "Helvetica-Neue" && kMDItemContentTypeTree != com.adobe.postscript-lwfn-font}, valueListAttrs = {<CFArray 0x6f5710 [0xa008dee0]>{type = immutable, count = 1, values = (
    0 : <CFString 0xa01602c8 [0xa008dee0]>{contents = "kMDItemContentType"}
    )}}, sortingAttrs = {<CFArray 0x6f5730 [0xa008dee0]>{type = immutable, count = 1, values = (
    0 : <CFString 0xa01603a8 [0xa008dee0]>{contents = "kMDItemContentModificationDate"}
    )}}, scopeList = {<CFArray 0x6f5750 [0xa008dee0]>{type = immutable, count = 1, values = (
    0 : <CFString 0xa0161a98 [0xa008dee0]>{contents = "kMDQueryScopeComputer"}
    (sometimes it names a font, sometimes the font name is "_")
    I suspect this means some vestigial adobe product has messed my system right up. I used to use CS4 but have long since removed it. I also have Air and Flash (the current gala beta) installed. I have had fontbook validate Helvetica Neue and check all fonts for duplicates - if external disks are plugged in at this time they all spin up.
    The other case is when downloading a file through clicking a link or alt-clicking a link (right-clicking a picture and saving it to the downloads folder does not cause this behaviour), and is accompanied by this much sparser line in the console:
    05/10/2010 08:25:06 kernel disk0s2: I/O error.
    The files themselves can be opened, moved and copied without incident and at regular speeds, so I doubt disk corruption. I've also performed a few full clone/restores on my boot disk with no effect. My initial thoughts were to blame a long-forgotten folder action that sorted downloads into different places (including a network share, if present), but disabling folder actions has not helped.
    So, any ideas? I'm fresh out.

    A workaround for the font-problem seems to be to turn off ATS - it's in FontBook.
    The second issue still eludes me.
    Things I have tried:
    Trashing ~/Library/Safari/
    Trashing ~/Library/Preferences/com.apple.Safari*
    Cleaning out every vestigial trace of anything suspect I had on my system (google keystone, logitech control centre, SIMBL, The Spark, iStat Menus, folder actions)
    Interestingly, the issue is not present for the guest user, so it IS something wrong with my user account. I just can't figure out what.
    Yes, making a brand new account would fix all this, providing I'm meticulous about testing the issue as I move /Users/Old/ into /Users/New/, but I'm kind of loathe to give up. It's surely something really simple!

  • Cartesian Product in BI Reports

    Hi Experts,
    I have following tables
    Dim: Population table
    Year, Gender, Age Range, Population
    2008 MALE <1 100
    2008 MALE 1-20 300
    2008 MALE 20+ 500
    And, Fact Employee table
    Employee Id, Year joined, Gender, Age range
    120 2008 MALE 20+
    121 2008 MALE 20+
    122 2008 MALE 1-20+
    123 2008 MALE 1-20+
    Now, when i joined my Dim and fact across year,gender, age range. (But franly, speaking it is some thing N:N rather than 1:N)
    And, when i tried to create report as Year joined, year, Population , total no. of employees
    Each Year joined column in fact is multiplied across dim (instead of only one year - which is resulting in cartesian)
    How to avoid.. this one ?
    I knew, how to resolve this issue on answers. But, it should be done dynamically.
    Edited by: GRK on Feb 4, 2013 6:50 AM
    Edited by: GRK on Feb 6, 2013 10:06 AM

    Since you know how to fix this using Answers; I would suggest fix it in answers->run the report-> get the BI generated Physical SQL query. Study the Physical SQL query and try to put it in RPD.
    That would be the easiest way to do.
    Mark if helps :)
    Edited by: Srini VEERAVALLI on Feb 6, 2013 2:32 PM

  • Problem opening workbook with parameter LOV

    hi,
    i have created a parameter LOV that contains a huge amount of data. i have set the query timing in discov admin as well as desktop so that it comes fine there.
    but when i try to open the LOV page in the workbook in viewer its giving me the error :- 500 internal server error.oracle.discoiv.beans.ParameterException: parameter lov timeout.
    is there any way i can set the query timings in viewer?

    Hi,
    Try changing the ItemClassDelay parameter in your pref.txt file on the server.
    Rod West

  • Crystal report - Performance Information

    Hi,
    The performance of a report execution can be get calculated by the following 3 items of Performance Information dialog,
    Performance Timing node has:
    1. Run the database query
    2. Read database records
    3. Format first page
    In that, i understand the first two things, first one is the performance numbers to run the database query, second one is to read the database result-set after the query being executed.
    What does Format first page means? From the name i understand that its the performance timings for formatting the first page of the report. But i wanna know what crystal would do in this case???
    Because in one of my reports, the Format first page timings is similar to Run database query timing!!!!
    Can anyone let know what would be the issue and how to improve the performance timings of Format first page??

    Thanks! I agree with your points Ido...
    But in my reports there is no Page header, Page N of M, Grouping, sorting, etc.
    Its simply a data dump with 41 columns and around 50 rows in a page. Whats our end-user need is to just get a data dump by exporting the report into excel. So the columns in the reports are simply overlapped since there is no importance given to the look and feel of the report.
    And why I'm wondering is the Format first page taking almost the same time of Run the Database query!!!
    Any further thoughts?
    Regards
    Viswa

  • Timeout not working when calling stored procedure

    Hi,
    We have a Win32 application connected to ORACLE using ODBC API.
    A stored procedure (doing INSERT into 3 tables) is called via
    SQLPrepare and SQLExecute("{CALL SP(IN param...) ...}"), but
    Oracle never time out the statement.
    There are 2 types of modified timeouts:
    SQL_ATTR_QUERY_TIMEOUT = 20
    SQL_ATTR_CONNECTION_TIMEOUT = 60
    Even if I set LockTimeOut parameter in ORAODBC.ini file, it
    still doesn't work.
    I tried with SQLExecDirect("INSERT...") and it works fine.
    - Does time out works with oracle Stored Procedure ?
    - If not, how can I avoid application hangs when calling
    SQLExecute ?
    - I use "lock table MY_TABLE in exclusive mode" to simulate
    query timing out. Is the better way to do this ?
    Please, any help would be GREATLY appreciated :-)
    Thanks.
    -Dario Efine
    [email protected]
    Infos:
    - Application running on WinNT4 SP6a,
    - Oracle ODBC for Oracle 8.01.76.00,
    - Stored procedure has 10 IN parameters, it also uses 2 inner
    small functions.

    HiTopp wrote:
    I get a "Login Failed for user _____" error if I attempt to use incorrect credentials.
    That message is very likely coming from the database. To be sure, turn debugging on in the ColdFusion Administrator. Also check out the logs. We have to narrow this down, otherwise we could end up running circles.
    If the attribute pairs [username="valid_name", password="valid_password"] and [username="", password=""] work, but [username="valid_name", password="invalid_password"] fails, then the cause of the problem is most probably your code, and how it connects to the database(s). Could you show us all (or at least more) of the code?
    My first suggestion to you was to omit the line variables.storedProcService.clear();. Invoking clear() only makes sense when it occurs after addProcResults() or addParam(). Did you omit the line? What was the effect, with and without credentials?
    Could you please describe your infrastructure a bit more. From what I understand, there are at least 2 servers, S1 and S2. Let's say, ColdFusion is installed on S1. I am assuming from what has gone before that SQL Server, which runs the stored procedure, is on the second server S2.
    Go to the 'Client Variables' page in the ColdFusion Administrator. Verify that ColdFusion is indeed configured to use a database for client storage. What is the name of the datasource used as client store? Now, proceed to the datasource page and check out the settings for the client datasource. To which machine/database server does this datasource point?
    Jot down the server settings and credentials of the other datasources configured in the Administrator. To which machine/database server do these datasources point?

  • Status of OBIEE

    Hi Guys,
    Are there any Web pages that we can use to query the status of the Presentation Services Web Plug-in and/or the BI Server status via the Web Server of our choice?

    Lahari,
    Ok,Ask biz users to identify top 20 reports ( or use usage tracking) by Subject Area (you should have usage tracking enabled)
    1) Schedule those reports using agents daily(no delivery profile of e-mail or you can schedule to your e-mail id) after the code migration to prod or after COB.
    2) Write a custom SQL(Direct db request) on s_nq_acct and filter on column SUCCESS_FLG = 0 (FOR SUCCESS) and START_TS > SYSDATE-7 (last week reports)
    3) Filter out long running reports like TOTAL_TIME_SEC<=120sec
    SUCCESS_FLG  The completion status of the query: 0 - The query completed successfully with no errors. 1 - The query timed out. 2 - The query failed because row limits were exceeded. 3 - The query failed due to some other reason.
    4 ) Save the custom sql Direct DB report and create summarizied agent for the same and send it across the team
    Use substring funciton on saw_src_path and saw_dashboard columns to get exact report and dashboard names
    Thanks,
    Saichand

  • Incremental Loads and Refresh Date

    Hi all,
    Thank you for taking the time to review this post.
    Environment
    Oracle BI Applications 7.9.6 (Financial & Project Analytics)
    Oracle E-Business Suite 11.5.10
    Question
    I have a Test BI Apps 7.9.6 in a Test environment that is connected to a static EBS 11.5.10 data source. As part of my testing phase I'd like to do multiple Incremental Loads to get an accurate performance impact and timing study for the final pre-approval before migrating to Production. I can get a refresh of EBS which has a week's worth of transactions after my Initial Full Load. What I'd like to do is change Refresh Dates to "trick" the Incremental Load into only loading one days worth of data at a time, rather than the full week's worth of data in the Incremental load. Is this possible, and if so, how?
    Example timeline:
    Today - Initial Full load using Test EBS as of today
    1 week later - Refresh static Test EBS from Production with a week of transactions
    Post Refresh - Run daily Incremental jobs using static Test EBS
    First Incremental Load - Today's position + 1 day,
    Second " " - Today's position + 2 days,
    Third " " - Today's position + 3 days, etc
    As always all comments and solutions greatly appreciated.
    Kind Regards,
    Gary.

    Say on the 01st of the month, you did a Load.
    Then on the 08th of the month, the source EBS system was itself refreshed.
    What you want to do is to run a single day refresh on the 08th for all data from the 01st to the 02nd of the month), and then another single day referesh -- whether on the 08th or on the 09th , you don't care -- for all data from the 03rd to the 04th.
    Unfortunately, the refresh is from last refresh date to current date. You can't define "refresh upto date". Therefore, your first 'incremental' refresh on the 08th would refresh all data from the 02nd to the 08th in one shot. What you could try to do is
    a. After the first load on the 01st, shutdown the BI DWH.
    b. When the EBS test source is refresh on the 08th, reset your SYSTEM CLOCK ON THE BI DWH DATABASE SERVER to the 2nd (or 3rd) of the month.
    c. Now, when you run a refresh, BI will extract all data from the 01st to the 02nd or 03rd (even though EBS is as of the 08th).
    d. Once this is done, shutdown BI DWH.
    e. Reet the SYSTEM CLOCK ON THE BI DWH DATABASE SERVER to the 3rd or 4th of the month.
    f. Run another Incremental Refresh.
    ... and so on ...
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Coldfusion hangs

    Hi everybody,
    Since a while it looks like our Coldfusion server random
    decides to hang. After looking in the CF-log files we cannot point
    out what causes the hanging. Since the end of May an error message
    appears in the Application- and Exception-log files:
    Application-log:
    "Error","jrpp-5623","07/13/06","03:54:31",,"Error Executing
    Database Query.Timed out trying to establish connection The
    specific sequence of files included or processed is:
    /toolbox/test/http/cfajax/AJAX.cfm, line: 6 "
    Exception-log:
    "Error","jrpp-5623","07/13/06","03:54:31",,"Error Executing
    Database Query.Timed out trying to establish connection The
    specific sequence of files included or processed is:
    /toolbox/test/http/cfajax/AJAX.cfm, line: 6 "
    coldfusion.tagext.sql.QueryTag$DatabaseQueryException: Error
    Executing Database Query.
    at
    coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:579)
    at
    cfip_check2ecfm1523298093.runPage(/toolbox/test/http/cf/ip_check.cfm:6)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
    at
    coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1915)
    at
    cfApplication2ecfm1941991993.runPage(/toolbox/test/http/Application.cfm:40)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:152)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:349)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at
    coldfusion.filter.CfincludeFilter.include(CfincludeFilter.java:33)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:156)
    at
    coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:51)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:69)
    at
    coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at
    coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115)
    at coldfusion.CfmServlet.service(CfmServlet.java:107)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:257)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:318)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:426)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:264)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    These two messages are the last entries before the Coldfusion
    server hangs. When we look in the mentioned file AJAX.CFM on line 6
    there is nothing strange. It is a line in the middle of a query.
    Does anybody have a clue where we can search for what is
    causing the problem? Or does anybody have a solution?
    Thanx allready!!!
    Kind regards,
    Paul de Snaijer

    Hi,
    Thanx for your quick answer. Here are my answers:
    Is the datasource you are querying on the same server as
    /toolbox/test/http/cfajax/AJAX.cfm or is it on a different box?
    The database is installed on another server. The Coldfusion
    server runs on a UNIX machine and the Oracle database runs on a
    Windows machine
    How are you connecting to the datasource (ODBC, etc.)?
    We are connecting to the database thru the Oracle driver
    (chosen in the CF Administrator)
    Is the datasource used by other processes?
    The datasource is used by this application only. But in the
    application it is used serveral times and also at the same time.
    Thanx again!
    Kind regards,
    Paul de Snaijer

Maybe you are looking for

  • SAP SFTP Adapter

    HI FRIENDS, I need your help in two points - 1 -- Is there a document on sdn which covers the detailed information on SAP SFTP adapter? I found few links online but they are only covering few features. None of them talks about any limitation on the a

  • Can't open Word or Excell attachments

    Hi,    I am suddenly unable to open any Word or exell attachments!   PDF's are all ok. I am using the latest Chrome brower   Windows 7  Offfice 10  64bit processor.  I have a bt.com email. The docs open ok in my iphone. when I try to open a Word atta

  • Repeating Header question

    XMLP 5.5 Standalone Learning the ropes with XMLP, the provided samples are a very good, illustrative starting point. One thing I wonder: In the rtf_templates/advanced/RepeatHeader example, I found you can use <?for-each@section:G_CUSTOMER?> to do the

  • How to sort mailboxes ?

    I have more than 20 mailboxes in my iPhone 4, iOS 4.3.1 and I would like to sort them by order of priority. Any idea ? Xanks.

  • Blackmagic uncompressed avi to quicktime

    Here's a nice question to post on christmas eve (I've had my fill of sentimental films and good cheer - bah humbug) I've been given some uncompressed avi files to use in my current edit (using fcp). They were captured from Beta sp using a PC and a Bl