APEX... query run time

Hi,
My report is based on a view which holds apprx 15 million rows and 15- 20 columns... it is currently taking almost a mint to two to pull the data... May I know if there is a faster way to pull this info...?
Thanks again in advance

Hi user9231694
Please change your username to something a bit more meaningful - this is a friendly forum!
You should also read this...
[http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html]
You need to provide more information when your asking questions so that we can help. For instance, have you run the query outside of apex to see how long is takes, have you looked at the explain plan, can you post the query and explain plan etc etc?
Cheers
Ben

Similar Messages

  • To find Query Run-times

    Hi guys,
    i was trying to compare query run-times with and without BIA using RSRT, however i'm running into hurdles..
    the same query when executed twice (without BIA) without using cache is showing different data manager times
    i'm surprised how the reason could be
    the difference sometimes is very high even the wait times are also sometimes very different
    how to arrive at the average run-times are there any tools besides rsrt (i hve no access to statistics queries) but st03 doesnt seem to be of much help
    i'm lookin at the fine difference so accurate times are necessary
    thanks,
    your help will be greatly appreciated

    Hi.....
    check the following links :
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/e3807a6df402d3e10000000a1553f7/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/7c/2bde42fa712b78e10000000a155106/frameset.htm
    Another thing :
    If you want to use the BI statistics for Query runtimes, you will need the 0TCT_C01 InfoCube, together with the multiprovider 0TCT_MC01.
    The queries for the BI statistics to report over query runtimes are all built on the multiprovider.
    Besides that, you will need the virtual infoprovider 0TCT_VC01, to be able to report on the latest data. Because you will probably load the statistics each night into the 0TCT_C01 cube, you can report on the latest data using the 0TCT_VC01 virtual cube.
    Hope this helps you........
    Regards,
    Debjani.........
    Edited by: Debjani  Mukherjee on Sep 13, 2008 8:01 AM

  • Manage query - run time errors

    Hi,
    we have one user working at one desktop which receives error "run-time error 5" followed by "401 Automation error" when selecting the manage query wizard proceeding from the BPC Excel action pane.
    We only have this at one desktop. Any ideas?
    Dries

    Hi,
    You can check the query run time by using T code RSRT.
    1. Go to T code RSRT
    2. Give your query name.
    3. Click on the "Execute + Debug" tab
    4. Various check boxed for Debug options will appear on the screen
    5. Under the "Others" node you will find the check box for "Display Statics Data"
    6. Check this check box and click on continue.
    7. This will execute the query and provide you selection screen if any.
    8. Once the query is completely executed, click on "back" button or simply hit F3.
    9. This takes you to the "Statistic Data for Query Runtime screen"
    10. Here you can take the total of "Duration" column to get the total duration for query execution.
    Please refer following link for details:
    [http://help.sap.com/saphelp_nw70/helpdata/en/43/e3807a6df402d3e10000000a1553f7/frameset.htm]
    Hope this answers your query.
    - Geetanjali

  • Query running time

    Hai,
    I am new to Oracle. How to find the query running time in SQL plus.
    Edited by: user12283394 on Dec 20, 2009 10:33 PM

    SQL> set line 2000;
    SQL> set timing on;
    SQL> select instance_name
    2 from V$instance;
    INSTANCE_NAME
    syslog
    Elapsed: 00:00:00.03
    SQL>
    Regards
    Asif Kabir

  • How to measure query run time and mnitor performance

    Hai All,
                   A simple question. How to measure query run time and mnitor performance? I want to see the parameters like how long it took to execute, how much space it took etc.
    Thank you.

    hi,
    some ways
    1. use transaction st03, expert mode.
    2. tables rsddstat*
    3. install bw statistics (technical content)
    there are docs on this, also bi knowledge performance center.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
    BW Performance Tuning Knowledge Center - SAP Developer Network (SDN)
    Business Intelligence Performance Tuning [original link is broken]
    also take a look
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/31b6b490-0201-0010-e4b6-a1523327025e
    Prakash's weblog on this topic..
    /people/prakash.darji/blog/2006/01/27/query-creation-checklist
    /people/prakash.darji/blog/2006/01/26/query-optimization
    oss note
    557870 'FAQ BW Query Performance'
    and 567746 'Composite note BW 3.x performance Query and Web'.

  • To optimize query run-time

    Hi,
    I have an sql query that access a single table which contains approx. 10 million records. The table has 4 columns (there are no indexes defined for the columns), which are 'new_id', 'time', 'access_code' and 'graph_qty'. With time being defined in 'dd-mm-yyyy hh:mm:ss'. The idea is to scan the table to retrieve records whose 'time' and whose 'access_code' match with the condition in the where-clause and then de-normalize these records based on the 'access_code'. The resultant set would have records wherein 'access_code' is denormalized into columns, with each 'access_code' having a unique column.
    The query runs for about 30mins.
    /* '&¤t_date' is a pre-defined variable containing a date (assume sysdate)*/
    SELECT
    new_id
    , trunc(time) AS time
    , SUM(CASE WHEN access_code = '100' THEN graph_qty END ) AS graph_1
    , SUM(CASE WHEN access_code = '200' THEN graph_qty END ) AS graph_2
    , SUM(CASE WHEN access_code = '300' THEN graph_qty END ) AS graph_3
    , SUM(CASE WHEN access_code = '400' THEN graph_qty END ) AS graph_4
    , SUM(CASE WHEN access_code = '500' THEN graph_qty END ) AS graph_5
    , SUM(CASE WHEN access_code = '600' THEN graph_qty END ) AS graph_6
    , SUM(CASE WHEN access_code = '700' THEN graph_qty END ) AS graph_7
    , SUM(CASE WHEN access_code = '800' THEN graph_qty END ) AS graph_8
    , SUM(CASE WHEN access_code = '900' THEN graph_qty END ) AS graph_9
    , SUM(CASE WHEN access_code = '1000' THEN graph_qty END ) AS graph_10
    FROM
    dummy_table
    WHERE trunc(time) IN ( '&¤t_date'
    , ADD_MONTHS('&¤t_date',-1)
    , ADD_MONTHS('&¤t_date',-3)
    , ADD_MONTHS('&¤t_date',-6)
    , ADD_MONTHS('&¤t_date',-12)
    , ADD_MONTHS('&¤t_date',-13)
    , ADD_MONTHS('&¤t_date',-15)
    , ADD_MONTHS('&¤t_date',-18)
    , ADD_MONTHS('&¤t_date',-24)
    AND access_code IN ('100','200','300','400','500','600','700','800','900','1000')
    GROUP BY
    new_id
    , time
    Please suggest ways to reduce the qry run-time.
    Thanks,
    kartik

    does this 20min include the time to display the data?
    how long much does it take to execute the following queries?
    select /*+ full(t) */ count(*) from dummy_table t;
    select count(*) from(
    SELECT
    new_id
    , trunc(time) AS time
    , SUM(CASE WHEN access_code = '100' THEN graph_qty END ) AS graph_1
    , SUM(CASE WHEN access_code = '200' THEN graph_qty END ) AS graph_2
    , SUM(CASE WHEN access_code = '300' THEN graph_qty END ) AS graph_3
    , SUM(CASE WHEN access_code = '400' THEN graph_qty END ) AS graph_4
    , SUM(CASE WHEN access_code = '500' THEN graph_qty END ) AS graph_5
    , SUM(CASE WHEN access_code = '600' THEN graph_qty END ) AS graph_6
    , SUM(CASE WHEN access_code = '700' THEN graph_qty END ) AS graph_7
    , SUM(CASE WHEN access_code = '800' THEN graph_qty END ) AS graph_8
    , SUM(CASE WHEN access_code = '900' THEN graph_qty END ) AS graph_9
    , SUM(CASE WHEN access_code = '1000' THEN graph_qty END ) AS graph_10
    FROM
    dummy_table
    WHERE trunc(time) IN ( '&¤t_date'
    , ADD_MONTHS('&¤t_date',-1)
    , ADD_MONTHS('&¤t_date',-3)
    , ADD_MONTHS('&¤t_date',-6)
    , ADD_MONTHS('&¤t_date',-12)
    , ADD_MONTHS('&¤t_date',-13)
    , ADD_MONTHS('&¤t_date',-15)
    , ADD_MONTHS('&¤t_date',-18)
    , ADD_MONTHS('&¤t_date',-24)
    AND access_code IN ('100','200','300','400','500','600','700','800','900','1000')
    select count(*) from(
    SELECT
    new_id
    , trunc(time) AS time
    , SUM(CASE WHEN access_code = '100' THEN graph_qty END ) AS graph_1
    , SUM(CASE WHEN access_code = '200' THEN graph_qty END ) AS graph_2
    , SUM(CASE WHEN access_code = '300' THEN graph_qty END ) AS graph_3
    , SUM(CASE WHEN access_code = '400' THEN graph_qty END ) AS graph_4
    , SUM(CASE WHEN access_code = '500' THEN graph_qty END ) AS graph_5
    , SUM(CASE WHEN access_code = '600' THEN graph_qty END ) AS graph_6
    , SUM(CASE WHEN access_code = '700' THEN graph_qty END ) AS graph_7
    , SUM(CASE WHEN access_code = '800' THEN graph_qty END ) AS graph_8
    , SUM(CASE WHEN access_code = '900' THEN graph_qty END ) AS graph_9
    , SUM(CASE WHEN access_code = '1000' THEN graph_qty END ) AS graph_10
    FROM
    dummy_table
    WHERE trunc(time) IN ( '&¤t_date'
    , ADD_MONTHS('&¤t_date',-1)
    , ADD_MONTHS('&¤t_date',-3)
    , ADD_MONTHS('&¤t_date',-6)
    , ADD_MONTHS('&¤t_date',-12)
    , ADD_MONTHS('&¤t_date',-13)
    , ADD_MONTHS('&¤t_date',-15)
    , ADD_MONTHS('&¤t_date',-18)
    , ADD_MONTHS('&¤t_date',-24)
    AND access_code IN ('100','200','300','400','500','600','700','800','900','1000')
    GROUP BY
    new_id
    , time

  • Unable to Create Query - Run Time Error

    Hi All,
    I'm try to create a query from a Cube .... the moment I drag 0CALMONTH and restrict it to Varaible Last Year This Month. I receive, the following error "Run Time Error 2147417848 (80010108) ....Automation Error. The Object Invoked has disconnected from its client.
    When I check with Event Viewer : The following message appear " ID: 1, Application Name: Microsoft Office Excel, Application Version: 12.0.6324.5001, Microsoft Office Version: 12.0.6215.1000. This session lasted 1784 seconds with 780 seconds of active time.  This session ended with a crash."
    I'm running Ms Vista Enterprise OS with Office 2007.
    Please advise
    TQ
    Nathan

    Hi,
         Actually this is a frontend error.
    Check the SAP Note Number: 1039191
    Download the DLL.
    Problem Description: There is a BI bug when we use BW3.5 frontend tool with BI7 datawarehouse workbench.
    Symptoms: When you try to restrict an object in Query designer, it will greayed out by giving runtime error.
    Solution: Take a backup of wdbspres.dll file which is present under C:\Program Files\SAP\FrontEnd\SAPgui. Copy the original
    file with this new file available in project filder. Problem will be resolved.
    Regards
    Karthik

  • Query run time increases with subsequent runs.

    Hello All
    I am looking for some hint about if someone else has faced such an issue in OBIEE
    We are trying to enhance performance of some OBIEE Analysis reports. Every time we do a change and deploy out changes the report runs very quick like in 40 seconds . Even when I run the physical query in the database it runs quick as well. After few minutes we run the report again it take 10 minutes and then after some time we run it again it takes 20 minutes. It stabilized around 30 minutes.
    We thought it needs more tuning. We tried some more, removed outer joins from the RPD, tuned those joins where we are fectching large amounts of data and deployed it again. Again the first time we ran the report it returned results in less than 30 seconds. Ran it again and it took 6 minutes. And again around 9 mins.
    Once again the physical SQL is quick too in the database.
    The first time we run the report we are happy to see the run time but subsequent runs take so long.
    This is a test envt. so there are not huge load on the database. Also currently we dont have any caching enabled but we may do that as well.
    I am just curious to see if anyone has faced something like this. I am running out of options on further tuning the views and joins that we are using.  I am not able to think, why the first time we check our reports they run fast and this behavior is so reproducible now.  And every time we start with our changes we delete all presentation layer cache etc.
    Thanks

    query caching is primarily a run-time performance improvement capability.and over a period of time, performance tends to improve due to cache hits for more refer this Managing Performance Tuning and Query Caching - 11g Release 1 (11.1.1)

  • Query Run time

    Hi good mOrning everybody.
    I am facing a problem regarding calculation of query runtime . From the time query is fired till the result comes in the Excel file . Is there any automated process to calculate ? If so please help me out.
    Can anybody please help me out ?

    Hi,
    Go To Transaction: ST03 on left hand side u can find Administrator, click the drop down and select Expert mode
    On the same left side you can find BW system load ,here you can find all the queries and their individual time of execution.
    To know query execution time for a particualr set of selection criteria, you can use the RSRT option in debug mode
    suresh

  • Calculation of KFs at query run-time based on Characteritics Drill-down

    Hello All,
    I have an Important Issue which I need to solve but got stuck.
    The report requirement is that we need calculate the KF values based on the drill-down selection in the report at run-time.
    Say for eg: if the user is drilling-down the report by customer, plant or company code or any thing else other than material group...we need to calculate / Include KF values for only Materail Group  = "A" and if we are at the materail group level we need to calculate all the material groups which includes A, B, T and so on.
    Please suggest what are the avialable options for me like using virtual key figures. please provide me with some sample codes.
    your help will be highly appricated.
    thanks,
    Pra

    any toughts....Pra

  • How to fill a Key figure at Query run time

    Hi All,
    I have a requirement where I have to fill a key figure while the query is running. This value is obtained by multiplying 2 attributes of a Material Master Data object.I  could have used Formula Variable but there are two problems -
    1. I have material in my info provider but not this Material Master Data object.
    2. For a particular material, there are multiple rows in the Master Data object. And I have to pick only one row by applying some condition on a field of the MD object.
    Please let me know if there is some way to implement this.

    Hello,
    You can obtain this using virtual KF. Create a KF and include in the cube on which report is built. Dont have any mapping/rule for the same.
    Now write ur code using SMOD and populate this KF during runtime.
    Regds,
    Shashank

  • Query Running Time Out

    Hi Friends,
    now here i have question. from st22 we can get list of query time out in production and from error log by fill_sp function we can get ABAP program name from which we can get querie's detail like name, cube name etc...
    but i am facing some of the query time out gives ABAP program name but cannt get query info from that !!! i tried it by se38 by that also i didnt find all the query info for few time out. is there any way i can get info for those query time out ??
    please reply to my as i am new to this forums....last time when i asked questions noone replied me !!!
    waiting for help !!

    Hi,
    if my question is not clear then let me just ask in general.
    from st22 how can i get query name which have been time out ??
    can u please elaborate the process ?
    thank you in advance and i will give the points once i get the solution.

  • Limit the Oracle query run time using Pro*C

    All,
    I would like to limit my sql query for say a duration of only 10-15 secs. I do not want to kill the oracle process but send a signal to the C program with some message that " its taking more time"
    Is there an param which I can use it to limit, without killing or shutting down the oracle session or process.
    Thanks in advance

    My answer is only for 1. problem (about ORA-01458)
    I think that you use declaration for cursor C0 with a varchar
    variable before you ininitialize length (member .len of varchar
    structure) of this variable.
    It's famous that many errors come from uninitialized varchar
    variables in Pro*C.

  • Query run time - BI Load Statistics

    Hi experts,
    In ST03N, the BI Workload for an query on a multiprovider is as follows for 2 different dates.
    26.02.2010:
    InfoCube: X
    Name of Query: Y
    No.of Nav. - 13
    Total time - 2,218.4
    Ø Total - 170.6
    MED: Total - 8.6
    OLAP Time -  1,603.7
    Ø OLAP - 123.4
    DB Time -  248.8
    Ø  DB - 19.1
    Frontend - 157.1
    Ø Frontend - 12.1
    Planning - 0
    Avg.Plan. - 0
    Unass.Time -  208.8
    Avg.Unass. - 16.1
    Selected - 8,509,963
    Select. / Transf. -  14.7
    26.03.2010:
    InfoCube: X
    Name of Query: Y
    No.of Nav.: 13
    Total time - 6,896.8 
    Ø Total - 530.5
    MED: Total - 11.9
    OLAP Time - 206.1
    Ø OLAP - 15.9
    DB Time -  887.9
    Ø  DB - 68.3
    Frontend - 75.3
    Ø Frontend -  5.8
    Planning - 0
    Avg.Plan. - 0
    Unass.Time -  5,727.5
    Avg.Unass. - 440.6
    Selected - 1,126,660
    Select. / Transf. - 87.7
    Our query runtime gradually increased. By the above values what are the things we need to consider to reduce the query runtime.
    Do we need to change any settings in the system to reduce query runtime ?
    What is the "Unass.Time" ?
    Please provide some inputs....
    Regards,
    Bhadri M.
    Edited by: Bhadri M on Mar 29, 2010 2:49 PM
    Edited by: Bhadri M on Mar 29, 2010 5:31 PM

    Hi,
    Execute one time this query in debug mode without cache. Verify a new values in ST03N transaction and put its here.
    Regards,
    Conrado
    Spanish SAP Forums administrator
    [www.forosap.com|www.forosap.com]

  • Which tables are hit when a query runs - time dependent objects performance

    Hello all,
    We are trying to see what are the effects of time dependent master data objects in query. We will have a key date as variable so user can see the data as a particular point.
    I am trying to see what are all the tables hit when a query is executed and how the time dependent info objects affect performance. Basically we are trying to see is - does the query hit the P or Q or Y tables of the infoobject. Is there any tcode or program that I can use to see which tables were hit and how much time the query took to execute.
    Also if the time dependent attribute is in free characteristic does it directly effect the query.
    If you can share some more experience with time dependent master data objects in query and its effects on performance that will be great.
    Thanks all in advance

    Hello Siggi, Thanks for inputs
    That is what I actually did before posting message here, the tables that are hit are /BI0/S...or /BI0/R and /BI0/T....    I never see the tables /BI0/P or /BI0/Q ... tables hit. I have a key date on variable screen at so when i put future or past date the /BI0/SDATE table is hit does it sound about right to you ?
    Is the /S table hit the most because the data is being seen from the SID's that are generated.
    Can you share your thoughts.
    Thanks again,
    Have assigned you points.

Maybe you are looking for