Sql excution time

Hi all,
DB:oracle 10g
os solaris.
By using dictinary views how to find out sql query execution time in Oracle with out AWR report...
Please let me know if any one knows....

Hi,
Below query is helpful.
- shows Day wise,User wise,Process id of server wise- CPU and I/O consumption
set linesize 140
col spid for a6
col program for a35 trunc
select p.spid SPID,to_char(s.LOGON_TIME,'DDMonYY HH24:MI') date_login,s.username,decode(nvl(p.background,0),1,bg.description, s.program ) program,
ss.value/100 CPU,physical_reads disk_io,(trunc(sysdate,'J')-trunc(logon_time,'J')) days,
round((ss.value/100)/(decode((trunc(sysdate,'J')-trunc(logon_time,'J')),0,1,(trunc(sysdate,'J')-trunc(logon_time,'J')))),2) cpu_per_day
from V$PROCESS p,V$SESSION s,V$SESSTAT ss,V$SESS_IO si,V$BGPROCESS bg
where s.paddr=p.addr and ss.sid=s.sid
and ss.statistic#=12 and si.sid=s.sid
and bg.paddr(+)=p.addr
and round((ss.value/100),0) > 10
order by 8;
check this link too
http://rafioracledba.blogspot.com/search?q=queries
Best regards,
Rafi.
http://rafioracledba.blogspot.com/

Similar Messages

  • Loading (point) features takes MapViewer 20 times sql exec time?

    I have a map which contains only one theme which shows 14500 point geometries stored in a table (accessed via a view). Rendering the map takes a long time, more than 22 secs. Looking at the log from MapViewer it seems like the sql execution time is not the problem, also in a sql editor the query is fast. Labeling and rendering is fast too. CPU is not very busy while rendering the map, memory usage is under 70 MB. The problem seems to be loading the features after executing the sql query.
    This is the logging:
    06/01/24 08:46:23 Tue Jan 24 08:46:23 CET 2006 DEBUG [oracle.sdovis.theme.pgtp] [ STOFFEN_INSTALLATIES ] sql exec time: 100ms, total time loading 14593 features: 21401ms.
    06/01/24 08:56:32 Tue Jan 24 08:56:32 CET 2006 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 21221ms.
    06/01/24 08:56:32 Tue Jan 24 08:56:32 CET 2006 FINEST [oracle.sdovis.RE] xfm: 0.0377536231884058 0.0 0.0 -0.0377536231884058 -2650.2018115942033 17432.848768115942
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 DEBUG [oracle.sdovis.VectorRenderer] time to render theme STOFFEN_INSTALLATIES with 14593 styled features: 951ms
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 DEBUG [oracle.sdovis.VectorRenderer] time to label theme STOFFEN_INSTALLATIES with 14593 styled features: 0ms
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 951ms
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 DEBUG [oracle.lbs.mapserver.core.MapperPool] freeMapper() begins...
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] preparation time: 0ms
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] querying/rendering time: 22182ms
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] packing time: 60ms
    06/01/24 08:56:33 Tue Jan 24 08:56:33 CET 2006 DEBUG [oracle.lbs.mapserver.core.RealWorker] [RealWorker] --------------- total time: 22242ms
    22 seconds is too long for our application. Does anyone know what could be wrong and what I could do to improve this?
    Thanks in advance,
    Ida

    22 secs seems too long.
    I tried something similar on old Sun Sparc (Ultra 60) machines. db on one Sun box, MV on another. Both on same local network.
    SQL> select count(1) from openls_dir_businesses where country_subdivision='MD' ;
    COUNT(1)
    24638
    No indexes, no other optimizations
    Fetching and rendering 24638 points took 19 secs or so.
    Fetch time 10 secs, render time 9 secs.
    Tue Jan 24 15:09:01 EST 2006 INFO [oracle.sdovis.DBMapMaker] **** time spent on loading features: 10741ms.
    Tue Jan 24 15:09:10 EST 2006 INFO [oracle.sdovis.DBMapMaker] **** time spent on rendering: 9083ms

  • Missing message file for PL/SQL compile time warnings

    I want to use PL/SQL compile time warnings but I don't have the message file on my system (or it is not installed correctly). This results in output like this:
    3/5 PLW-05005: Message 5005 not found; No message file for
    product=plsql, facility=PLW
    Where can I get this message file and what do I have to do to install it?
    Thank you.
    Alex.

    hi Will
    Maybe this is a beter forum for your question:
    "JDeveloper and OC4J 11g Technology Preview"
    JDeveloper and OC4J 11g Technology Preview
    success
    Jan Vervecken

  • I type from Brazil - like shifting the sql in time of execution

    Hi, friend�s
    like shifting the sql in time of execution inside of the netbeans
    Thank�s
    I Type from Brazil and you ?

    Hi!
    I don't understand your question? Do You want to know how to change SQL query in runtime?
    Thanks,
    Roman.

  • Oracle 11g Windows 2003 (SQL Respose Time)

    Hi Guys,
    My SQL Response Time is more ttan 100% and keeps on increasing. How can I fix this? The Application users are complaining that the system is very slow.
    Thank you.

    I cannot start/ stop dbconsoleHow do you do this? Control panel? Command line?
    Post the output of
    emctl start dbconsole
    Werner

  • Query excution time

    Hi friends.
    Iam excuting a query, i wanted to find the query excution time. kindly tell me is tr any transaction code to find out this or any ways to know this.
    regards,
    Balu.

    if statistics are implemented then in query desinger search for run time query. run this query by giving ur query as input which needs to be evaluated.
    bhaskar

  • Top sql elasped time, how true is that

    hi guys,
    i am viewing an addm report and is concern about a top sql activity.
    i have an sql having top elasped time.
    <i>
    2,372      2,275      128,690,535      0.00      4.28      fphtjnquzzpud      [email protected] (TNS V1-V3)      SELECT USER_ID FROM SUBSCRIBER...
    </i>
    q1) what is the meaning of elasped time ?
    the time taken per execution of an sql statement ?
    q2) is the elasped time in the report shown above = sum of all the the elapsed time per execution of the sql ?
    if that the case, the most/frequently i run a SQL statement, the higher the elasped time it will be and thus higher db time.
    but how can we say that it is an inefficient sql since it has the most elasped time just because it is run way too frequently then other sqls ?
    Please advise
    Regards,
    Noob

    Hi,
    It is
    in the below addmrpt.sql the time which show 20393 is the elapsed time of the sql..
    SQL statements consuming significant database time were found.
       RECOMMENDATION 1: SQL Tuning, 24% benefit (20393 seconds)
          ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
             "9tkc7559d5drs".
             RELEVANT OBJECT: SQL statement with SQL_ID 9tkc7559d5drs and
             PLAN_HASH 1303522576But in awrrrpt.sql the elapsed time showing is for the total number of times the sql is executed in the DB.
    ^LSQL ordered by Elapsed Time       DB/Inst: STEELP/STEELP1  Snaps: 13011-13012
    -> Resources reported for PL/SQL code includes the resources used by all SQL
       statements called by the code.
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
       into the Total Database Time multiplied by 100
      Elapsed      CPU                  Elap per  % Total
      Time (s)   Time (s)  Executions   Exec (s)  DB Time    SQL Id
         6,761      1,869            1     6761.3    11.2 4hsz1t5dsmhy4
    Module: XXLOTDETSo check the addmrpt report.
    thanks.
    baskar.l

  • How to resolve PL/SQL lock timer event

    We have EBS 11.5.10.2 on 9.2.0.8 db. the Accrual Reconciliation Rebuild Manager program always stuck on wait event PL/SQL lock timer. I want to know how to resolve the wait event. I use below query to identify wait
    SELECT vs.sid,vs.serial#,vs.inst_id,vs.osuser,vw.event,vw.p1,vw.p2,vw.p3 ,vt.sql_text , vs.program
    FROM gv$session_wait vw, gv$sqltext vt , gv$session vs
    WHERE vw.event = 'PL/SQL lock timer'
    AND vt.address=vs.sql_address
    AND vs.inst_id = vw.inst_id
    AND vs.sid = vw.sid;
    Thanks in Adv.

    Many concurrent managers in eBusiness Suite implement "sleeps" so that they they wake up to check fnd_concurrent_requests every N minutes.
    I would ignore this wait event (but i would check to see that the managers don't have very short sleeps and aren't scanning the requests queue too frequently and/or that there aren't too many manager processes doing such).
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    BTW: Are you very sure that the waits are in the program "Accrual Reconciliation Rebuild Manager" ? It seems to be a Manager to me.
    Edited by: Hemant K Chitale on Jul 31, 2009 12:08 AM

  • Please advise what is the query to identify a SQL executed time

    Hi all
    Please advise what is the query to identify a SQL executed time.
    eg, a DML executed at 16-Apr-2013 11:45hrs

    Try like..
    select LAST_LOAD_TIME, ELAPSED_TIME, MODULE, SQL_TEXT elasped from v$sql order by LAST_LOAD_TIME desc

  • SQL Response Time in Cloud Control 12c

    Hi all gurus,
    SQL Response Time Screen in Cloud Control 12c , (translated from portuguese to english) is not showing any information.
    One week ago the most expensive SQL commands were showed.
    Can someone tell me where can I find any documentation to clarify this?
    Many thanks,
    Kaz

    Please check following MOS notes.
    12c SQL Response Time Graph does not display values (Doc ID 1603800.1)
    How to Troubleshoot SQL Response Metric Graph from EM DB Home Page (Doc ID 786487.1)

  • SQL response time is 698.18% of baseline?  MEANS..!!!

    I am getting "SQL response time is 698.18% of baseline." Warning on Oracle 10g Database
    Can anyone know what does this means?
    Thanks,
    Waheed

    Actually i have deployed application on Oracle 10g AS which is using Oracle 10g Database...and i am getting this warning on Oracle 10g DB
    I hope you understand...

  • To track SQL Execution time automatically

    Hi All,
    I have requirement of tracking execution time of for each SQL executed.
    For Eg, If i run command create index, in SQLPLus session, time to execute create index command should be tracked.
    Any idea how to implement this?
    Any help is appreciated.

    899485 wrote:
    You have mistaken me. We have 2 environments. Dev,Prod and QA. 2 or 3?
    So when code is moving to Production we need atleast approx time of deployment of code. Why should there be a relationship between execution times on Prod and Dev?
    Do Prod and Dev have the very same hardware? Same type storage system? Same storage system configuration ito redundancy? Same data volumes? Same processing loads? Are the execution plans the same? Are the Oracle version and patch levels the same? Are the instance and database initialisation settings the same? Etc. etc.
    It may vary but we want approx time. For that we want to capture SQL execution time.So if the Prod execution time is larger than the Dev approx time, then there is a problem?
    How is that a more sensible approach than looking at overall performance and utilisation on Prod, determining the most CPU intensive SQLs, the most I/O intensive SQLs, the most often executed SQLs, and addressing these within the context and environment and h/w and processing loads on Prod?
    Comparing execution times will simply say that the may be a problem. Not that there is a definitive problem. You still need to evaluate that metric and determine if this indicates a problem.
    So seeing that this evaluation needs to be done, why not use better metrics? Like what AWR uses? Like what OEM shows?
    Our application is dataware house application. So before insertion we disable the index and after load we enable index while enabling we capture execution time for enabling.Instrumentation is a different principle. And instrumenting your code to record the process run, the number of rows processed is a sensible approach to keeping track of production run-times, data volumes processed and even failures.
    But I see very little value in taking Dev runtimes and trying to apply that as a benchmark on Prod for identifying performance issues.

  • 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.

  • SQL Server Time Zone settings

    Hi Folks,
      I am looking for some help on how we will handle time zone setting in a SQL Cluster.  We currently have a six node SQL cluster with multiple instances running on it.  I have been asked to supply a new Instance for a new project but the problem
    is the users that will be using it are based in New Zealand and We are located in Dublin!  They will be using a Dynamics Navision database on this Instance.  So my question is can I set the time zone different on this new Instance to their time,
    cant seem to find any details this.  Most of the documentation seems to indicate you use the datetimeoffset feature or its usually handled within the Application.  I am hoping its the latter but any help on this would be grateful, especially if somebody
    had experience with the issue before.
    Thanks
    TD

    That's quite the time difference, hope you're not on-call ;)
    SQL Server doesn't maintain it's own time, it just inherits it from Windows, so in this case you'll have to leave the time as-is and allow the app to handle it. I've previously worked with navision over two time zones (only a one hour difference though) and
    I believe it maintains dates in UTC.
    Just be careful that any custom code you run in SQL Server jobs, etc also uses UTC.
    Edit: The
    Nav datetime is stored in UTC
    A DateTime is stored in the database as Coordinated Universal Time (UTC). 

  • Sql date time

    hi i have a date time field in ms sql server 2005
    i have 2 form fields i need to insert into the datetime
    i am using CAST(@SchDateTime AS DATETIME) to convert my
    datetime from
    #DateFormat("#form.SMS_Date# #form.SMS_Time#",'dd/mm/yyyy
    hh:mm:ss')#
    but the time is not inserting correctly any ideas how i
    insert 2 form fields into sql ?
    many thanks

    KeithLaw999 wrote:
    > the time is not inserting correctly
    What does not correctly mean?
    > #DateFormat("#form.SMS_Date#
    #form.SMS_Time#",'dd/mm/yyyy hh:mm:ss')#
    DateFormat parses a date value (not a date and time). It uses
    US date formats. So "12/2/2007" will be considered December 2nd,
    not February 12th. Also, is your time using a 12-hour or 24-hour
    clock? It its a 12-hour clock sql server might assume AM, unless
    you included a time marker (ie AM or PM).
    > am using CAST(@SchDateTime AS DATETIME) to convert my
    datetime
    Convert() provides more control, but I don't know if
    dd/mm/yyyy hh:mm:ss is one of the supported styles. An alternative
    is to use CF to parse the strings into a valid datetime object
    first, instead of passing a string to sql server and letting it do
    the parsing.

Maybe you are looking for

  • Problem Installing Final Cut Studio Upgrade

    I recently purchased the Final Cut Studio Upgrade. When I went to input my SN for FCP 6 to install the upgrade, it rejects it as invalid. Have FCP 6 on my computer operating just fine. what gives?

  • Documentation for Custom Disposition Action services in URM

    In 11g URM, the documentation references the ability to create a custom disposition action by accessing one of the pre-defined services and passing parameters. Unfortunately I can not find documentation stating what the parameters are for each of the

  • Can i take print out of report

    hi    my report has line-size 205 czn i take print out of OUTPUT of this on A4 sheet on landscape.      my second question is : - - what CIZ refer in SAP script i have seen it like                                             <b> &J_1IEXCHDR-EXBED(CIZ

  • Help! It says my Adobe Flash program is vulnerable & shoud be updated, yet the links only go to a long page of text, no download link!

    Here is the link I see everywhere that there is a video link option., I do not see any way to click through 7 GET the update! Should I update everything such as Java too, & how? Thank you! https://www.mozilla.org/en-US/plugincheck/?utm_source=firefox

  • How to protect a pdf file by a password

    Hi, I have written a program to send payslip through email . This mail sends the payslip as a PDF attachment. I want to password protect that PDF document, so that it asks for a password before being opened by the employee. Your suggestions will be h