Server Administration :: Elapsed Time In AWR Report?
Nov 7, 2011
I have an AWR report based on two snapshots one an one hour time window, under the "SQL ordered by Elapsed Time" section, there is a query having Elapsed Time = 7012 seconds, which is almost two hours, how is this possible? I have been told that this i aggregate value of all sessions.
On AWR, I see two script that are out of ordinary, and I want to make sure that I interpret them correctly.
1) "Elap per Exec (s)" shows 3263.49 with 1 "Executions". 2) "Elap per Exec (s)" shows 3180.17 each execution with 2 "Executions".
Does this mean that this script ran for ~ 54 minutes (3263.49 / 60 seconds) for 1 "Execution" and ~ 53 minutes (3180.17 / 60 seconds) per each execution? I need to understand "Elapsed Time (s),CPU Time (s),Executions ,Elap per Exec (s), % Total DB Time" represent.
I am executing below two SQL's at a time in a .sql file and I want the total execution time of these two queries:-
set timing on; select 1 from dual; select 2 from dual;
The output of the above sql file is returning the results like below which is expected:-
1 ---------- 1
Elapsed: 00:00:00.01
2 ---------- 2
Elapsed: 00:00:00.00
I want the total execution time of the two SQL queries at a time, I mean post execution of the two queries I want to know the total execution time, in this case is execution case will be 00:00:00.01.
Elapsed Time (s) CPU Time (s) Executions Elap per Exec (s) % Total DB Time SQL Id SQL Module SQL Text 2,423 1 3,919 0.62 1.83 gt49gg0fnc5x8 srv_dr@ahs (TNS V1-V3) UPDATE /*+ CCL<OENDB_FILE... 2,227 14 1 2227.16 1.68 bggfx8a04prj9 SQL*Plus select * from (select n.source... .........
On [SQL ordered by Elapsed Time], [SQL Module] shows an indication that a SQL was executed by which process (i.e. srv_dr@ahs)outside of SQL*PLUS.If [SQL Modeule] shows as [SQL*Plus], does it mean the query was run in SQL*PLUS manually or directly?I have the SQL ID. How do I find out who, how, and exactly what time it was run?
I executed a query which executed quickly (1.7 seconds) but since its output took time in displaying on the console the time shown by 'set timing on was 39.5 seconds
also I took trace (tkprof) for the same.My query is why the timings under 'Total Waited' (43.19 and 1.69) are not added to the elapsed time 1.83 seconds
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ SQL*Net message to client 1 0.00 0.00 db file sequential read 85704 0.31 460.55 latch free 1 0.00 0.00 SQL*Net message from client 1 14.98 14.98
[code]...
Why the elasped time changed when data and plan hasn't changed at all? Also why the plan has different stats for round 1 and 2 on db1 and db2?
I ran it 2 times each round each database so hard parsing shall not be issue.Also why the number of rows accessed are different in db1,db2 and db3,db4 especially for step1 when count of crt.qtn_cun_id is similar?
In fact when the query was taking long I was the only user on the system Also I used hard coded value (no bind variables at all)
I checked num_rows, distinct keys as well which are quite similar across all 4 databases Also no stats where gather during the query execution
what does mean VERSION_TIME column in V$DATABASE;i know that there is an other column which is called CREATED which indicates when the database has been created and i think it will never change,but, what about VERSION_TIME ? when does it change ?
I am using the client system to change the setting and the time zone differs from that of production. Even though the job is scheduled to run at 5 AM it show the start date as 6:30 PM which is the client system time.
What should be our approach when we see the disk response time is bad for a particular tablespace in database.I heard a good disk response time should be on an average 10ms.
our system admin is changing the time zone on solaris system, how can it effect my DB or as DBA what should i check before he do that and after he change the time zone. he is changing the time zone because of an issue with the DST (Daylightsaving time).
Currently there is only one report server for publishing reports in our application server . Its a standalone installation, oracle load balancing is not installed.I am thinking about starting atleast three more report servers to increase the performance
1) Having multiple report server increase performance or not? 2) Oracle report server load balancing how it is configured on same one sever?
Is there any script to run or a way in oracle database to get the whole database structure such as (Tablespaces, schemas, datafiles, redo-log files, tables(structure), views....etc) plus the number of daily transactions and operations happens such as (insert, delete, update,...etc)
Generally, a fully detailed report of my database structure, changes in structure and daily DML operations.
I use the following query to find out the remaining time to complete the table statistics which is running currently.
SELECT SID, SERIAL#, opname, SOFAR, TOTALWORK,username,context, ROUND(SOFAR/TOTALWORK*100,2) COMPLETE FROM V$SESSION_LONGOPS WHERE TOTALWORK != 0 AND SOFAR != TOTALWORK order by 1;
SOFAR column shows 9325 and totalwork column shows 12287.How to calculate the columns in terms of hours and minutes ?
And also sometime the query never shows the output of the query for the current running query.
I have create a mview using a dblink with the refresh difference of every 10min. Suddenly I check the mview refresh date and time it was not getting refreshed automatically at the time interval specified.
drop MATERIALIZED view log on afccv.tbl_voicechat; drop MATERIALIZED VIEW SMSCHAT.TBL_VOICECHAT_NEW1 ; CREATE MATERIALIZED VIEW SMSCHAT.TBL_VOICECHAT_NEW1 ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
[code]....
I am trying to find out what is the cause of not refreshing and also googled for the same. got some link also either not linked to same problem or not cleared.. Where should i checked regarding the error cause.
i am using oracle 10g on solaris 10 os.currently archived log is generated by size wise 52 mb.i want to know whar is the best practice for archive log generation . it should be time interval or size wise.
our DB machines time is one hour ahead of Active Directory, as we sync our time with AD, is there any contribution of Database in the wrong time of solaris machines ? and for the resolution of problem, what can be checked at DB side.
We are experiencing tx row lock wait time over hours. There is no blocking session and it seems that the application hangs. What is funny is that when we gather_stats on the tables, those tx row lock wait are being released.
We are using Oracle 10g on Linux. Followings are some contents from the AWR report:
Elapsed: 60.26 (mins) DB Time: 437.27 (mins)Here why the DBTime is greater than Elapsed Time. Is it due to the fact that this is the total time spent in user calls by multiple sessions i.e. ( some sessions were on CPU, some were in IDLE state waiting for I/O)
The below statistics show that CPU was used only for 5,363 seconds. We have 8 CPU grid, so total CPU time is 60.26* 8= 482.08 Min. I want to know where does the remaining time was spent. Also there is 20.4% of Total Call Time. How does it is calculated.
CPU time 5,363 20.4. The below statistics for reference:
We have scheduled some Jobs such as monthly, semi-annually reports using dbms_scheduler. we use 10gR2 software and windows 2003 server. we have a report which supposed to run at 4:00 AM and as soon as the report finishes it sends the report as email to the authorized users. when the scheduler ran the report inside the report it shows as ran at 3:08 AM where they get systimestamp. but when i query the
select last_stat_time, next_run__date from dba_scheduler_jobs where job_name ='TEST';
last_start_time next_run_date 03-DEC-12 04.00.00..223000 AM -04:00 07-JAN-13 04.00.00..200000 AM -04:00
when I query systimestamp from dual on that database from sqlplus: i get the following: systimestamp 04-DEC-12 07.40.16..152000 AM -05:00
I see the difference of -04.00 and -05.00 from both of the queries. i know the systimestamp from dual is correct. how to I fix the scheduler Job to run at the correct time with daylight savings to take effect?
elapsed time = time spent on waits + time CPU was used
Total time during snaps = Elapsed time + (may be) time waited for CPU...In AWR is it possible to draw such equation? I can see that the AWR report has following elements
1) End Snap time - Begin Snap time 2) DB time - as mentioned at the top of AWR report 3) DB CPU - in "Top 5 Timed Foreground Events" (I assume this is 'CPU used by sesson timing' in statspack) 4) Total of time for all Statistics in "Time Model Statistics" 5) BUSY_TIME + IDLE_TIME - "Operating System Statistics"
Time between 2 snapshots? or what else? Also for which seconds to multiply to 'DB Time(s)' per second and 'DB CPU(s)' per second in Load Profile to get the db time and CPU time?
I understand that when data is read from the disk, I/O is done..And When computations are done then CPU is used..Then where the following equation fits?
I want to make report of processing time for tasks. Every task has several stages and connected with them modification dates. I need calculate total processing time for every task.
In my calculations i have to consider only "working" hours. There is time window table (For example working hours: from 8 a.m to 4 p.m, but can be different thats why i use table with id - different id = different time window). Scripts i used to simulate problem:
create table t ( id number, s_date date, e_date date ); declare [code]........
table t constrains "working" hours:
12011-04-10 08:00:002011-04-10 16:00:00 12011-04-11 08:00:002011-04-11 16:00:00 ... but could be also
table w contains tasks history processing by team (8 hours for tenet, rest time (out of hours defined in table t) of working trough incident should be ignored/omitted in calculations):
At the beginning I tried this query, but I don't know how consider/dose time window from table t
select id, change_date, round( to_number(change_date-lag(change_date) over (partition by id order by change_date))*24*60*60) sec from w;
12011-04-10 10:00:00 12011-04-11 02:08:1658096 - sholud be 21600 (sum time only for 2011-04-10 16:00:00) 12011-04-11 16:23:1051294 - should be 28800 (sum time only from 2011-04-11 08:00:00 to 2011-04-11 16:00:00) 22011-04-12 08:12:30 22011-04-13 00:40:1559265 - should be 28050 (sum time only from 2011-04-12 08:12:30 to 2011-04-12 16:00:00) 32011-04-14 09:37:54