Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: --> outcome each time query ran slow AFTER 31 runs
If I read the line:
"Fetch 31 0.07 7.88 7 186 124
93"
then I conclude it took almost 8seconds to complete the query 31 times
(resulting in 3 records each run).
But!: the response is very variable, sometimes 10msec sometimes 2seconds!
<--- that
's what makes it so difficult for me. I better have a query which performs
each run the same....
The outcome after 31 runs:
TKPROF: Release 8.1.7.0.0 - Production on Ma Jan 6 22:11:46 2003
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Trace file: C:\oracle\admin\PREV\udump\ora01604.trc Sort options: default
count = number of times OCI procedure was executed cpu = cpu time in seconds executing elapsed = elapsed time in seconds executing disk = number of physical reads of buffers from disk query = number of buffers gotten for consistent read current = number of buffers gotten in current mode (usually for update) rows = number of rows processed by the fetch or execute call ****************************************************************************
alter session set sql_trace=true
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer goal: CHOOSE
Parsing user id: 20 (PREVENT)
select 'stephan'
from
dual
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 20 (PREVENT)
Rows Execution Plan
------- --------------------------------------------------- 0 SELECT STATEMENT GOAL: CHOOSE 0 TABLE ACCESS (FULL) OF 'DUAL' ****************************************************************************
SELECT ORA_TQ_BASE$.NEXTVAL
FROM
DUAL
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 1)
Rows Row Source Operation
------- --------------------------------------------------- 1 SEQUENCE 1 TABLE ACCESS FULL DUAL ****************************************************************************
update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,order$=:6,
cache=:7,highwater=:8,audit$=:9
where
obj#=:1
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: SYS (recursive depth: 2)
Rows Row Source Operation
------- --------------------------------------------------- 1 UPDATE SEQ$ 1 INDEX UNIQUE SCAN (object id 99) ****************************************************************************
select id_district district_id, district_name
FROM district, district_street where
(district_id=id_district) AND (place_street_id=707)
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 1
Optimizer goal: CHOOSE
Parsing user id: 20 (PREVENT)
Rows Execution Plan
------- --------------------------------------------------- 0 SELECT STATEMENT GOAL: CHOOSE 0 HASH JOIN [:Q411002] SELECT /*+ ORDERED NO_EXPAND USE_HASH(A2) */ A1.C0,A1.C1 FROM :Q411001 A1,:Q411000 A2 WHERE A2.C0=A1.C0 0 TABLE ACCESS GOAL: ANALYZED (FULL) OF 'DISTRICT' [:Q411001] SELECT /*+ Q411001 NO_EXPAND ROWID(A1) */ A1."ID_DISTRICT" C0, A1."DISTRICT_NAME" C1 FROM "DISTRICT" PX_GRANULE(0, BLOCK_RANGE, DYNAMIC) A1 0 INDEX GOAL: ANALYZED (FAST FULL SCAN) OF 'DISTRICT_STREET_4' (NON-UNIQUE) [:Q411000] ****************************************************************************
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 2
Misses in library cache during execute: 1
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ---------- ------
Misses in library cache during parse: 2
65 user SQL statements in session.
2 internal SQL statements in session.
67 SQL statements in session.
2 statements EXPLAINed in this session.
1 session in tracefile. 65 user SQL statements in trace file. 2 internal SQL statements in trace file. 67 SQL statements in trace file. 5 unique SQL statements in trace file. 2 SQL statements EXPLAINed using schema: PREVENT.prof$plan_table Default table was used. Table was created. Table was dropped. 643 lines in trace file.Received on Mon Jan 06 2003 - 15:13:26 CST