How can I get SQL query excution time

Hi ,
When I run a query , How can i get total execution time for that query.
Thanks,
Regards,
Basha.

There are several ways:
1. In SQL, issue SET TIMING ON
2. Trace your query:
- ALTER SESSION SQL_TRACE=TRUE;
- Execute your query
- ALTER SESSION SET SQL_TRACE=FALSE
- Decode the tracefile left at USER_DUMP_DEST using TKPROF.

Similar Messages

  • How can I get a query in the search field to open in a new tab or new window from the current window?

    How can I get a query in the search field to open in a new tab or new window from the current window?

    If you are searching via the Search Bar on the Navigation Toolbar, this preference can be changed to have searches there open in a Tab.
    Type '''about:config''' in the Address Bar and hit Enter. Then answer "I'll be careful". Type this pref in the Search at the top.
    '''browser.search.openintab''' = double-click to toggle to '''true'''

  • How can I get the date and time and display it on the report main page?

    Gurus,
    How can I get the date and time and display it on the report main page?
    Thanks!

    Hello,
    You can create a Formula Colum returning a date :
    function CF_1Formula return Date is
    begin
    RETURN(SYSDATE);
    end;
    Put a Field in the Layout having this formula column as source .
    Regards

  • How Can I find SQL Query in Database

    Dear Experts,
    How Can I find SQL Query in Database.

    Hi,
    U mena what query got executed in db? u can try V$SQL for it.
    Regards
    Bharath

  • How can I  get System dates  with time scheduler using threads

    how can I get System dates with time scheduler using threads.is there any idea to update Date in my application along with system Date automatic updation...

    What the heck are you talking about and whatr has it to do with threads?
    Current time: System.currentTimeMillis. Date instances are not supposed to be updated.

  • How to findout the sql query elapsed time for last call

    RDBMS vesrion: 11.2.0.3
    How can I get the stats like how much time it took for a query to run if I know the "sql_id"
    I can query v$sql and find out the "parse_calls","fetches","execution","elapsed_time" (microsecs)
    but if the query executed 20 times then the elapsed time will be the cumulative of all the executions.
    But I want to know the ELAPSED TIME of LAST CALL(last execution only) for that sql_id.
    Edited by: rcc50886 on Aug 2, 2012 8:35 AM

    You can easily monitor the statement and see the results for v$sql_monitorWe didn't enabled the monitor for the sql's and its not possible in my current enveronment due to some issues with management.
    Is there any way to find out the last elapsed time for the sql with known sql_id ?

  • How can I get the query name in webitem method ?

    Hello,
    I have defined a new web item but I can't retrieved parameter of my webitem in the RENDER method for instance. I have declared a parameter in the RSRRENDERATR table like this :
    REN_NAME : MY_WEBITEM
    ATR_NAME : MY_PARAM
    ATR TYP : TEXT
    CHR MAX LEN : 50
    How can I do this ? How can I get the MY_PARAM value in the RENDER method ?
    Thanks a lot
    GC.
    Edited by: CoGr on Feb 11, 2008 12:10 PM

    Hi ,
    data l_r_view type ref cl_rsr_www_view.
    data l_t_text_symbols type rrx1_t_txt_symbols.
    l_r_view =? n_r_data_provider.
    CALL METHOD L_R_VIEW->n_r_request->TEXT_ELEMENTS_GET
      IMPORTING
        E_T_TXT_ELEMENTS = l_t_text_symbols.
    l_t_text_symbols contains all DP information like Query technical name, or Report text last load etc.
    best regards,
    kai

  • HOW CAN I GET SQL/SERVICE

    Dear Mr./Ms.
    I browsed the your download Web pages, I couldn't found the ORACLE SQL/Service. Please tell me how can I get this software.I'll be glad to hear from you.
    sincerely yours
    YANG Hongyu

    Hi Peter,
    Maybe this will help you out:
    http://c2anton.blogspot.com/2006/10/setting-up-ssl-for-application-express.html
    Regards,
    Max A.

  • How can I reduce BEx Query execution time

    Hi,
    I have a question regarding query execution time in BEx.
    I have a query that takes 45 mins to 1 hour to execute in BEx analyser. This query is run on a daily basis and hence I am keen to reduce the execution time.  Are there any programs or function modules that can help in reducing query execution time?
    Thanks and Regards!

    Hi Sriprakash,
    1.Check if your cube is performance tuned: in the manage cube from RSA1 / performance tab: check if all indexes and statistics are green. Aggregate IDx should as well be.
    2.Condense your cubes regularly
    3. Evaluate the creation of an aggregate with all characteristic used in the query (RSDDV).
    4.Evaluate the creation of a "change run aggregate": based on a standalone NavAttr (without its basic char in the aggr.) but pay attention to the consequent change run when loading master data.
    5. Partition (physically) your cubes systematically when possible (RSDCUBE, menu, partitioning)
    6. Consider logical partitioning (by year or comp_code or ...) and make use of multiproviders in order to keep targets not too big...
    7.Consider creating secondary indexes when reporting on ODS (RSDODS)
    8.Check if the query runtime is due the master data read or the infoprovider itself, or the OLAP processor and/or any other cause in tx ST03N
    9.Consider improving your master reads by creating customized IDX (BITMAP if possible and depending on your data) on master data table and/or attribute SIDs when using NAvs.
    10.Check that your basis team did a good job and have applied the proper DB parameters
    11.Last but not least: fine tune your datamodel precisely.
    hope this will give you an idea.
    Cheers
    Sunil

  • How Can I Execute Sql Query in Managed bean?

    Hi,
    I want to execute sql query in managedbean and get the query result. How can I do?
    Best wishes!

    You can do this by having current Database connection your application is using like this
    public static synchronized DBTransaction getDBTransaction(){
    FacesContext ctx = FacesContext.getCurrentInstance();
    ValueBinding vb = ctx.getApplication().createValueBinding("#{data}");
    BindingContext bc = (BindingContext)vb.getValue(ctx.getCurrentInstance());
    DataControl dc = bc.findDataControl("AppModuleDataControl");
    ApplicationModuleImpl am = ((ApplicationModuleImpl)(ApplicationModule)dc.getDataProvider());
    return am.getDBTransaction();
    and then user DBTransaction object to create Statement and PreparedStatement you can find those in java doc.

  • How can I get the query name/aggregationslevel in my planning function?

    Hi,
    is it possiable to get the query name/aggregationslevel in a planning fuction?
    thanks for your idea.
    hongwei

    Hi,
    The interface IF_RSPLFA_INFOPROV_DESC
    provides methods for retrieving the most important properties of an InfoProvider from the point of view of the implementation class of a planning function type.
    Methods GET_T_CHARNM and GET_T_KEYFNM return the names of the characteristics and key figures in the InfoProvider.
    You can get the properties of the InfoObjects and compound information by calling method GET_TAB_IOBJ_PRO and GET_TAB_IOBJ_CMP .
    Does this help?
    Best Regards
    Shyam

  • How can i get files from my time capsule to my new mac?

    Hello there, 
    I know this topic i much discussed, but searching has not turned up a solution.
    I have a new mac book pro 15 on order and want to grab my files from my time capsule.   My old mac book pro 15 (3 months old) was encrypted with file safe.  In the past i have never had good results with bringing data to a new mac from time capsules; I've tried many times for my self and family.  As a result I use the time capsule for day to day old file retrieval needs and do manual backups of my data onto externals and NAS devices for migration to new computers-tedious but it has yet to fail me.  This time, I did that with everything except a few folders of my movies and pictures.  They are now prisoner on the time capsule.
    What is the best way to get files off the time capsule and does it require that my login and user name on the new mac be identical to that which was on my old mac?
    (I change my user names each time i get a new mac, not specifically on purpose but i haven't paid attention to what they were when setting up a new computer.)
    any assistance is appreciated.
    Thanks

    Thanks Allan,
    Help me understand what question you're referring to.  I've been through several new macs and am not sure what specifically you're speaking about.
    My old mac had a partition on the drive that I do not want on the new mac, so I am concerned about doing a full restore and prefer a file by file or folder by folder. is this possible?

  • How can I get SQL Developer working on Windows 7 64-bit

    Hi all,
    I've followed the download instructions for SQL Developer v4 as per the download page (
    http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-download-v4-1925679.html
    Install instructions: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-install-windows-1969674.html
    I've  installed SQL Developer requires JDK 7 (jdk-7u25-windows-x64.exe) - with no issues.
    I've also downloaded and unziped to sqldeveloper-4.0.0.12.27-no-jre.zip to C:\Program Files\
    SQL Developer successfully starts, but when I try to connect to a data source, I get the following error:
    Status : Failure -Test failed: C:\Oracle11g\product\11.2.0\client_1\BIN\ocijdbc11.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform.
    can any tell me how I fix this issue........... I getting fed up using clunky toad

    You're trying to use a 32 bit Oracle Client with 64 bit SQL Developer.
    You're doing something in SQL Developer that's requiring us to load OCI - in your connection properties, use Network Alias instead of Connect Identifier for TNS, or make sure in your Advanced settings you don't have 'Use OCI/Thick driver' enabled.
    Or, install a 64 bit copy of the Oracle Client and tell SQL Developer to use that home instead.

  • How can i get a query to count a number of strings?

    I want the query to count for me how many holidays there are to the USA in my table. But im not sure how to get it to retreive the result of a string or varchar2 datatype. This is what i have tried so far.
    select count(COUNTRYVIS) <<this column contains all the countries visited
    from "IT220_HOLIDAYDETAILS" <<this is the table where the column is
    where COUNTRYVIS = "USA" << this is the result i want it to count
    ORA-00904: "USA": invalid identifier <<this is the error message im getting, is there a way to count strings?
    Thanks in advance!

    This has nothing to do with APEX. Please post basic SQL questions on the +{forum:id=75}+ forum.
    In any OTN forum, alll code should be posted wrapped in <tt>\...\</tt> tags as described in the FAQ:
    select count(COUNTRYVIS) -- this column contains all the countries visited
    from "IT220_HOLIDAYDETAILS" -- this is the table where the column is
    where COUNTRYVIS = "USA" -- this is the result i want it to countYou appear to be struggling with the distinction between identifiers and text literals. Hint: One uses double quotes, the other single quotes.
    Note that quoted identifiers are generally not a good idea.

  • How can i write sql query for this result ?

    Hello Dear,
    Here is the script first.
    CREATE TABLE ACC_TEST(
    AD_ID NUMBER,
    AD_NAME VARCHAR2(50),
    AD_SPM_ID NUMBER);
    /data are
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (136,'Saleh Ahmed',129);
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (142,'Hamidur Rahman',136);
    Insert into ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) values (124,'Jasim Uddin',null);
    INSERT INTO ACC_TEST (AD_ID,AD_NAME,AD_SPM_ID) VALUES (129,'Sazib',124);I Need The Following Result When I Pass A Value Of Ad_Id. For Example I Pass 142 Then Result Should Be
    Select Ad_Id,Ad_Name
    From..
    where ad_id=142
    Ad_Id   Ad_Name
    136     Saleh Ahmed
    129     Sazib
    124     Jasim Uddin
    If I Pass Ad_Id=136 Then Result Should Be
    Ad_Id   Ad_Name
    129     Sazib
    124     Jasim Uddin
    If I Pass Ad_Id=129 Then Result Should Be
    Ad_Id   Ad_Name
    124     Jasim Uddin Database 10G XE
    Any help will be helpful

    Hi,
    HamidHelal wrote:
    WoW ! you acutely got my point. How did you understand that ? lLuck guess. Guessing is usually not the best way to solve problems. It's usually faster and more reliable to say exactly what you want, as well as give an example.
    ittle bit more i want to know, if i want to restrict the output not more then 2, what would be sql ?Now you're not even giviing an example!
    Maybe you want something like this:
    SELECT     ad_id
    ,     ad_name
    FROM     acc_test
    WHERE     LEVEL     BETWEEN 2 AND 3          -- Changed
    START WITH     ad_id     = :target_ad_id
    CONNECT BY     ad_id     = PRIOR ad_spm_id
    ;which will show jsut the parent and the grandparent of the given row.
    I do work with forms developer very much. Sql knowledge is as oracle sql book(cerfitication 9i). But this type of sql isn't available there.
    where can i learn this type of sql ? Different sql then ordinary ?Certification is a different topic entirely.
    There are books and web sites dealing with more advanced techniques. Sorry, I don't know any well enough to recommend them. Some authors (such as Tom Kyte) are consistently good.
    Here are a couple of sites that explain CONNECT BY queries:
    http://www.adp-gmbh.ch/ora/sql/connect_by.html
    http://www.oradev.com/connect_by.jsp

Maybe you are looking for