-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 1 / 72
March 04, 2005 case study.txt
SQL> @hstats tName Null?
Type----------------------------------------- --------
----------------------------PKEY NOT NULL NUMBERSTATUS NUMBERFLAG
CHAR(1)
==========================================================================================Table
Statistics==========================================================================================TABLE_NAME
: TLAST_ANALYZED : 04-MAR-2005 11:53:17DEGREE : 1PARTITIONED :
NONUM_ROWS : 100000CHAIN_CNT : 0BLOCKS : 207EMPTY_BLOCKS :
48AVG_SPACE : 934AVG_ROW_LEN : 13MONITORING : NOSAMPLE_SIZE :
100000-----------------==========================================================================================Column
Statistics==========================================================================================Name
Analyzed Null? NDV Density # Nulls # Buckets Sample Avg Col
Len==========================================================================================PKEY
03/04/2005 NOT NULL 100000 .000010 0 1 100000 4STATUS 03/04/2005 3
.333333 0 1 100000 2FLAG 03/04/2005 2 .500000 0 1 100000
1==========================================================================================Index
Information==========================================================================================INDEX_NAME
: SYS_C002345INDEX_TYPE : NORMLAST_ANALYZED : 04-MAR-2005
11:53:17DEGREE : 1PARTITIONED : NOBLEVEL : 1LEAF_BLOCKS :
187DISTINCT_KEYS : 100000AVG_LEAF_BLOCKS_PER_KEY :
1AVG_DATA_BLOCKS_PER_KEY : 1CLUSTERING_FACTOR : 204BLOCKS_IN_TABLE
: 207ROWS_IN_TABLE : 100000
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 2 / 72
March 04, 2005 case study.txt
-----------------INDEX_NAME : T_N1INDEX_TYPE : NORMLAST_ANALYZED
: 04-MAR-2005 11:53:17DEGREE : 1PARTITIONED : NOBLEVEL :
1LEAF_BLOCKS : 238DISTINCT_KEYS : 3AVG_LEAF_BLOCKS_PER_KEY :
79AVG_DATA_BLOCKS_PER_KEY : 68CLUSTERING_FACTOR :
204BLOCKS_IN_TABLE : 207ROWS_IN_TABLE :
100000-----------------INDEX_NAME : T_N2INDEX_TYPE :
NORMLAST_ANALYZED : 04-MAR-2005 11:53:17DEGREE : 1PARTITIONED :
NOBLEVEL : 1LEAF_BLOCKS : 293DISTINCT_KEYS :
2AVG_LEAF_BLOCKS_PER_KEY : 146AVG_DATA_BLOCKS_PER_KEY :
204CLUSTERING_FACTOR : 408BLOCKS_IN_TABLE : 207ROWS_IN_TABLE :
100000-----------------INDEX_NAME : T_N3INDEX_TYPE :
NORMLAST_ANALYZED : 04-MAR-2005 11:53:17DEGREE : 1PARTITIONED :
NOBLEVEL : 1LEAF_BLOCKS : 355DISTINCT_KEYS :
6AVG_LEAF_BLOCKS_PER_KEY : 59AVG_DATA_BLOCKS_PER_KEY :
68CLUSTERING_FACTOR : 410BLOCKS_IN_TABLE : 207ROWS_IN_TABLE :
100000-----------------==========================================================================================Index
Columns
Information==========================================================================================Index
Name Pos# Order Column Name
Expression==========================================================================================
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 3 / 72
March 04, 2005 case study.txt
SYS_C002345 1 ASC PKEYT_N1 1 ASC STATUST_N2 1 ASC FLAGT_N3 1 ASC
STATUS
2 ASC FLAGSQL>SQL>SQL>SQL> @hstats flagsName Null?
Type----------------------------------------- --------
----------------------------FLAG NOT NULL CHAR(1)
==========================================================================================Table
Statistics==========================================================================================TABLE_NAME
: FLAGSLAST_ANALYZED : 04-MAR-2005 10:58:41DEGREE : 1PARTITIONED :
NONUM_ROWS : 5CHAIN_CNT : 0BLOCKS :EMPTY_BLOCKS :AVG_SPACE
:AVG_ROW_LEN : 4MONITORING : NOSAMPLE_SIZE :
5-----------------==========================================================================================Column
Statistics==========================================================================================Name
Analyzed Null? NDV Density # Nulls # Buckets Sample Avg Col
Len==========================================================================================FLAG
03/04/2005 NOT NULL 5 .200000 0 1 5
1==========================================================================================Index
Information==========================================================================================INDEX_NAME
: SYS_IOT_TOP_29235INDEX_TYPE : IOTLAST_ANALYZED : 04-MAR-2005
10:58:41DEGREE : 1PARTITIONED : NO
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 4 / 72
March 04, 2005 case study.txt
BLEVEL : 0LEAF_BLOCKS : 1DISTINCT_KEYS :
5AVG_LEAF_BLOCKS_PER_KEY : 1AVG_DATA_BLOCKS_PER_KEY :
1CLUSTERING_FACTOR : 0BLOCKS_IN_TABLE :ROWS_IN_TABLE :
5-----------------==========================================================================================Index
Columns
Information==========================================================================================Index
Name Pos# Order Column Name
Expression==========================================================================================SYS_IOT_TOP_29235
1 ASC FLAG
SQL> @hix tIndex Flags Height Column
Name------------------------------ ------- ------
------------------------------SYS_C002345 U 2 PKEYT_N1 2 STATUST_N2
2 FLAGT_N3 2 STATUS. FLAGSQL>SQL> @hix flagsIndex Flags
Height Column Name------------------------------ ------- ------
------------------------------SYS_IOT_TOP_29235 U 1
FLAGSQL>SQL> @hcons tType Constraint # Column Constraint Rule
Refers To----------- ----------------------- -- ----------
---------------------- ---------------Primary Key T.SYS_C002345 1
PKEY
SQL> @hcons flagsType Constraint # Column Constraint Rule
Refers To----------- ----------------------- -- ----------
---------------------- ---------------Primary Key
FLAGS.SYS_IOT_TOP_29235 1 FLAG
SQL> get test
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 5 / 72
March 04, 2005 case study.txt
1 update t2 set flag='B'3* where status=2
SQL>SQL>SQL> @hdsTableOwner[OP] :TableName :
tColumnList : flag, statusWhereClause:PageSize[30] :Table blocks
below hwm Table rows
(B) (R)---------------------- ----------------
208 100,000More:
Block selectivity Block count Row selectivity Row countF STATUS
(pb = b/B) (b) (pr = r/R) (r)- ---------- -----------------
-------------- ----------------- ----------------A 2 79.81% 166
1.60% 1,600B 2 79.81% 166 78.40% 78,400A 1 10.58% 22 0.20% 200B 1
10.58% 22 9.80% 9,800A 0 8.65% 18 0.20% 200B 0 8.65% 18 9.80%
9,800SQL>SQL>SQL>SQL> select count(*) from t where
status = '2' ;
COUNT(*)----------
800001 row selected.SQL>SQL> select count(*) from t where
status = '2' and flag = 'B' ;
COUNT(*)----------
784001 row selected.SQL>
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 6 / 72
March 04, 2005 case study.txt
SQL>SQL> @dodmlEnter .sql file name (without extension):
testEnter the workspace name: updateEnter the scenario name:
problemDisplay results of SQL (ON/OFF)?: offCapturing statistics
information...=================================================================Name
of 10046 trace file:
hotsos_ora_3364.trc=================================================================Explain
Plan for Scenario update:problem
--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 33333 | 99999 | 22 || 1 | UPDATE | T | | |
||* 2 | TABLE ACCESS FULL | T | 33333 | 99999 | 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2)Note: cpu costing is
off=================================================================Name
of 10053 trace file:
hotsos_ora_1988.trc=================================================================
Actual Plan for Scenario update:problemSTAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=563 r=651 w=0 time=5998399 us)'STAT #1
id=2 cnt=80000 pid=1 pos=1 obj=29237 op='TABLE ACCESS FULL T
(cr=211 r=200 w=0 time=480438 us)'SQL>SQL>SQL>
@lsscstatList of values
(Workspace)------------------------------------------------------------UPDATEWorkspace
[]: update
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 7 / 72
March 04, 2005 case study.txt
List of values
(Scenario)------------------------------------------------------------PROBLEMScenario
[]: problem
Statistic NameStatistic Type (S=stat, L=Latch)
Value---------------------------------------- -
--------------active checkpoint queue latch L 10cache buffer
handles L 54channel operations parent latch L 4checkpoint queue
latch L 6,935child cursor hash table L 15Consistent RBA L 66dml
lock allocation L 7FIB s.o chain latch L 4FOB s.o list latch L
4hash table column usage latch L 4lgwr LWN SCN L 66library cache
pin allocation L 90list of block allocation L 7messages L 258mostly
latch-free SCN L 66multiblock read objects L 48post/wait queue L
38redo writing L 216session allocation L 2session idle bit L
17session timer L 2sim partition latch L 20simulator hash latch L
5,867simulator lru latch L 206SQL memory manager latch L 2SQL
memory manager workarea list latch L 134transaction allocation L
1undo global data L 693active txn count during cleanout S 2buffer
is not pinned count S 244bytes received via SQL*Net from client S
1,123bytes sent via SQL*Net to client S 709calls to get snapshot
scn: kcmgss S 340calls to kcmgas S 542change write time S
65cleanout - number of ktugct calls S 150cluster key scan block
gets S 4
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 8 / 72
March 04, 2005 case study.txt
cluster key scans S 2commit cleanouts S 452commit cleanouts
successfully completed S 452commit txn count during cleanout S
150consistent changes S 2consistent gets - examination S 155CPU
used by this session S 175CPU used when call started S 175CR blocks
created S 2data blocks consistent reads - undo S 2records applieddb
block changes S 177,204deferred (CURRENT) block cleanout S
2applicationsdirty buffers inspected S 2,309enqueue releases S
213enqueue requests S 215free buffer inspected S 2,819free buffer
requested S 2,339hot buffers moved to head of LRU S 139immediate
(CURRENT) block cleanout S 450applicationsindex fetch by key S
2index scans kdiixs1 S 11leaf node splits S 150messages sent S 63no
work - consistent read gets S 231opened cursors cumulative S
18pinned buffers inspected S 60prefetched blocks S 176prefetched
blocks aged out before use S 57recursive calls S 121redo buffer
allocation retries S 2redo entries S 88,288redo log space requests
S 2redo log space wait time S 41redo ordering marks S 132rollbacks
only - consistent read gets S 2session pga memory S 16,336shared
hash latch upgrades - no wait S 11SQL*Net roundtrips to/from client
S 5switch current to new buffer S 150table scans (long tables) S
1user calls S 8write clones created in foreground S 107
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 9 / 72
March 04, 2005 case study.txt
buffer pool L 0cache buffers chains L 480,644cache buffers lru
chain L 6,850enqueue hash chains L 444enqueues L 126library cache L
282library cache pin L 178redo allocation L 88,471redo copy L
88,333row cache enqueue latch L 204row cache objects L 219shared
pool L 193execute count S 18parse count (hard) S 2parse count
(total) S 18redo size S 22,887,828table fetch by rowid S 11table
scan blocks gotten S 207table scan rows gotten S 100,000buffer is
pinned count S 0consistent gets S 563db block gets S 96,896physical
reads S 651physical writes S 0session logical reads S 97,459sorts
(disk) S 0sorts (memory) S 0sorts (rows) S 0elapsed time
(centiseconds) S 621
Actual Plan for Scenario UPDATE:PROBLEMSTAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=563 r=651 w=0 time=5998399 us)'STAT #1
id=2 cnt=80000 pid=1 pos=1 obj=29237 op='TABLE ACCESS FULL T
(cr=211 r=200 w=0 time=480438 us)'SQL>SQL>SQL>SQL>
@hopttraceEnter the workspace name: updateEnter the scenario name:
problem
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 10 / 72
March 04, 2005 case study.txt
Dump file e:\oracle\admin\hotsos\udump\hotsos_ora_1988.trcFri
Mar 04 11:01:50 2005ORACLE V9.2.0.6.0 - Production
vsnsta=0vsnsql=12 vsnxtr=3Windows 2000 Version 5.1 Service Pack 2,
CPU type 586Oracle9i Enterprise Edition Release 9.2.0.6.0 -
ProductionWith the Partitioning, OLAP and Oracle Data Mining
optionsJServer Release 9.2.0.6.0 - ProductionWindows 2000 Version
5.1 Service Pack 2, CPU type 586Instance name: hotsosRedo thread
mounted by this instance: 1Oracle process number: 13Windows thread
id: 1988, image: ORACLE.EXE
*** SESSION ID:(7.214) 2005-03-04
11:01:50.148***************************************PARAMETERS USED
BY THE
OPTIMIZER********************************OPTIMIZER_FEATURES_ENABLE
= 9.2.0OPTIMIZER_MODE/GOAL = Choose_OPTIMIZER_PERCENT_PARALLEL =
101HASH_AREA_SIZE = 4194304HASH_JOIN_ENABLED =
TRUEHASH_MULTIBLOCK_IO_COUNT = 0SORT_AREA_SIZE =
2097152OPTIMIZER_SEARCH_LIMIT = 5PARTITION_VIEW_ENABLED =
FALSE_ALWAYS_STAR_TRANSFORMATION = FALSE_B_TREE_BITMAP_PLANS =
TRUESTAR_TRANSFORMATION_ENABLED = FALSE_COMPLEX_VIEW_MERGING =
TRUE_PUSH_JOIN_PREDICATE = TRUEPARALLEL_BROADCAST_ENABLED =
TRUEOPTIMIZER_MAX_PERMUTATIONS = 2000OPTIMIZER_INDEX_CACHING =
50_SYSTEM_INDEX_CACHING = 0OPTIMIZER_INDEX_COST_ADJ =
50OPTIMIZER_DYNAMIC_SAMPLING = 1_OPTIMIZER_DYN_SMP_BLKS =
32QUERY_REWRITE_ENABLED = TRUEQUERY_REWRITE_INTEGRITY =
ENFORCED_INDEX_JOIN_ENABLED = TRUE_SORT_ELIMINATION_COST_RATIO =
0_OR_EXPAND_NVL_PREDICATE = TRUE
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 11 / 72
March 04, 2005 case study.txt
_NEW_INITIAL_JOIN_ORDERS = TRUEALWAYS_ANTI_JOIN =
CHOOSEALWAYS_SEMI_JOIN = CHOOSE_OPTIMIZER_MODE_FORCE =
TRUE_OPTIMIZER_UNDO_CHANGES = FALSE_UNNEST_SUBQUERY =
TRUE_PUSH_JOIN_UNION_VIEW = TRUE_FAST_FULL_SCAN_ENABLED =
TRUE_OPTIM_ENHANCE_NNULL_DETECTION = TRUE_ORDERED_NESTED_LOOP =
TRUE_NESTED_LOOP_FUDGE = 100_NO_OR_EXPANSION =
FALSE_QUERY_COST_REWRITE = TRUEQUERY_REWRITE_EXPRESSION =
TRUE_IMPROVED_ROW_LENGTH_ENABLED = TRUE_USE_NOSEGMENT_INDEXES =
FALSE_ENABLE_TYPE_DEP_SELECTIVITY = TRUE_IMPROVED_OUTERJOIN_CARD =
TRUE_OPTIMIZER_ADJUST_FOR_NULLS = TRUE_OPTIMIZER_CHOOSE_PERMUTATION
= 0_USE_COLUMN_STATS_FOR_FUNCTION = TRUE_SUBQUERY_PRUNING_ENABLED =
TRUE_SUBQUERY_PRUNING_REDUCTION_FACTOR =
50_SUBQUERY_PRUNING_COST_FACTOR = 20_LIKE_WITH_BIND_AS_EQUALITY =
FALSE_TABLE_SCAN_COST_PLUS_ONE = TRUE_SORTMERGE_INEQUALITY_JOIN_OFF
= FALSE_DEFAULT_NON_EQUALITY_SEL_CHECK =
TRUE_ONESIDE_COLSTAT_FOR_EQUIJOINS = TRUE_OPTIMIZER_COST_MODEL =
CHOOSE_GSETS_ALWAYS_USE_TEMPTABLES =
FALSEDB_FILE_MULTIBLOCK_READ_COUNT = 16_NEW_SORT_COST_ESTIMATE =
TRUE_GS_ANTI_SEMI_JOIN_ALLOWED = TRUE_CPU_TO_IO =
0_PRED_MOVE_AROUND =
TRUE***************************************BASE STATISTICAL
INFORMATION***********************Table stats Table: T Alias: T
TOTAL :: CDN: 100000 NBLKS: 207 AVG_ROW_LEN: 13-- Index
stats
INDEX NAME: SYS_C002345 COL#: 1TOTAL :: LVLS: 1 #LB: 187 #DK:
100000 LB/K: 1 DB/K: 1 CLUF: 204
INDEX NAME: T_N1 COL#: 2TOTAL :: LVLS: 1 #LB: 238 #DK: 3 LB/K:
79 DB/K: 68 CLUF: 204
INDEX NAME: T_N2 COL#: 3TOTAL :: LVLS: 1 #LB: 225 #DK: 2 LB/K:
112 DB/K: 204 CLUF: 408
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 12 / 72
March 04, 2005 case study.txt
INDEX NAME: T_N3 COL#: 2 3TOTAL :: LVLS: 1 #LB: 273 #DK: 6 LB/K:
45 DB/K: 68 CLUF: 410
_OPTIMIZER_PERCENT_PARALLEL =
0***************************************SINGLE TABLE ACCESS
PATHColumn: STATUS Col#: 2 Table: T Alias: T
NDV: 3 NULLS: 0 DENS: 3.3333e-001 LO: 0 HI: 2NO HISTOGRAM: #BKT:
1 #VAL: 2
TABLE: T ORIG CDN: 100000 ROUNDED CDN: 33333 CMPTD CDN:
33333Access path: tsc Resc: 22 Resp: 22Access path: index
(equal)
Index: T_N1TABLE: T
RSC_CPU: 0 RSC_IO: 148IX_SEL: 0.0000e+000 TB_SEL:
3.3333e-001Skip scan: ss-sel 0 andv 2ss cost 92index io scan cost
0
Access path: index (index-only)Index: T_N3
TABLE: TRSC_CPU: 0 RSC_IO: 92
IX_SEL: 3.3333e-001 TB_SEL: 3.3333e-001BEST_CST: 22.00 PATH: 2
Degree: 1
***************************************OPTIMIZER STATISTICS AND
COMPUTATIONS***************************************GENERAL
PLANS***********************Join order[1]: T[T]#0Best so far:
TABLE#: 0 CST: 22 CDN: 33333 BYTES: 99999Final - All Rows Plan:
JOIN ORDER: 1CST: 22 CDN: 33333 RSC: 22 RSP: 22 BYTES:
99999IO-RSC: 22 IO-RSP: 22 CPU-RSC: 0 CPU-RSP: 0
QUERYexplain plan set statement_id='update:problem' forupdate
t
set flag='B'where status=2
PLANCost of plan: 22Operation...........Object
name.....Options.........Id...Pid..UPDATE STATEMENT 0UPDATE T
1TABLE ACCESS T FULL 2 1QUERYalter session set events '10053 trace
name context off'
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 13 / 72
March 04, 2005 case study.txt
SQL>SQL>SQL>SQL>SQL>SQL> @horatraceEnter the
workspace name: updateEnter the scenario name: problemReview tkprof
output? (Y/N): YYour trace file (hotsos_ora_3364.trc) has been
spooled to your default directory.Tkprof output will be displayed
first (if requested).hotsos_ora_3364.trc will be displayed in your
editor after any tkprof output.Press Enter to continue. . .TKPROF:
Release 9.2.0.6.0 - Production on Fri Mar 4 11:29:18 2005Copyright
(c) 1982, 2002, Oracle Corporation. All rights reserved.Trace file:
hotsos_ora_3364.trcSort options: default. . .. . .update t
set flag='B'where status=2
call count cpu elapsed disk query current rows------- ------
-------- ---------- ---------- ---------- ----------
----------Parse 1 0.00 0.00 0 0 0 0Execute 1 1.73 6.00 651 563
96896 80000Fetch 0 0.00 0.00 0 0 0 0------- ------ --------
---------- ---------- ---------- ---------- ----------total 2 1.73
6.00 651 563 96896 80000Misses in library cache during parse:
1Optimizer goal: CHOOSEParsing user id: 41Rows Row Source
Operation-------
---------------------------------------------------
0 UPDATE (cr=563 r=651 w=0 time=5998399 us)80000 TABLE ACCESS
FULL T (cr=211 r=200 w=0 time=480438 us)
. . .
. . .
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 14 / 72
March 04, 2005 case study.txt
Dump file e:\oracle\admin\hotsos\udump\hotsos_ora_3364.trc. . ..
. .PARSING IN CURSOR #1 len=40 dep=0 uid=41 oct=6 lid=41
tim=90089340242 hv=1483413068 ad='2bf70aac'update t
set flag='B'where status=2
END OF STMTPARSE
#1:c=0,e=1509,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=4,tim=90089340234. .
.. . .EXEC
#1:c=1734375,e=6000464,p=651,cr=563,cu=96896,mis=0,r=80000,dep=0,og=4,tim=90095354755.
. .. . .
SQL>SQL>SQL>SQL>SQL> get test_ans1
1 update t2 set flag='B'3 where status=24* and flag != 'B'
SQL>SQL>SQL> @dodmlEnter .sql file name (without
extension): test_ans1Enter the workspace name: updateEnter the
scenario name: answer1Display results of SQL (ON/OFF)?:
offCapturing statistics
information...=================================================================Name
of 10046 trace file:
hotsos_ora_1256.trc=================================================================Explain
Plan for Scenario update:answer1
--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 16667 | 50001 | 22 |
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 15 / 72
March 04, 2005 case study.txt
| 1 | UPDATE | T | | | ||* 2 | TABLE ACCESS FULL | T | 16667 |
50001 | 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2 AND "T"."FLAG"'B')Note: cpu costing is
off=================================================================Name
of 10053 trace file:
hotsos_ora_1292.trc=================================================================
Actual Plan for Scenario update:answer1STAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=215 r=717 w=0 time=2217354 us)'STAT #1
id=2 cnt=1600 pid=1 pos=1 obj=29237 op='TABLE ACCESS FULL T (cr=211
r=205 w=0 time=277281 us)'SQL>SQL>SQL> @lsscstatList of
values
(Workspace)------------------------------------------------------------UPDATEWorkspace
[UPDATE]:
List of values
(Scenario)------------------------------------------------------------ANSWER1PROBLEMScenario
[PROBLEM]: answer1
Statistic NameStatistic Type (S=stat, L=Latch)
Value---------------------------------------- -
--------------active checkpoint queue latch L 4channel operations
parent latch L 2checkpoint queue latch L 2,357child cursor hash
table L 15Consistent RBA L 5dml lock allocation L 3hash table
column usage latch L 6
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 16 / 72
March 04, 2005 case study.txt
lgwr LWN SCN L 5library cache pin allocation L 42list of block
allocation L 6messages L 31mostly latch-free SCN L 5multiblock read
objects L 48post/wait queue L 4redo writing L 21session allocation
L 2session idle bit L 17sim partition latch L 2simulator hash latch
L 464simulator lru latch L 91SQL memory manager latch L 1SQL memory
manager workarea list latch L 67undo global data L 10buffer is not
pinned count S 210bytes received via SQL*Net from client S
1,142bytes sent via SQL*Net to client S 709calls to get snapshot
scn: kcmgss S 9calls to kcmgas S 178CPU used by this session S
33CPU used when call started S 33db block changes S 16,111dirty
buffers inspected S 835enqueue releases S 4enqueue requests S 6free
buffer inspected S 898free buffer requested S 981hot buffers moved
to head of LRU S 365index scans kdiixs1 S 1messages sent S 6no work
- consistent read gets S 209opened cursors cumulative S 6pinned
buffers inspected S 36prefetched blocks S 181prefetched blocks aged
out before use S 25recursive calls S 8redo entries S 8,011session
pga memory S 189,544shared hash latch upgrades - no wait S 1SQL*Net
roundtrips to/from client S 5switch current to new buffer S
166table scans (long tables) S 1user calls S 8write clones created
in foreground S 12buffer pool L 0
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 17 / 72
March 04, 2005 case study.txt
cache buffers chains L 65,004cache buffers lru chain L
2,507enqueue hash chains L 16enqueues L 11library cache L
150library cache pin L 82redo allocation L 8,038redo copy L
8,028row cache enqueue latch L 58row cache objects L 61shared pool
L 136execute count S 6parse count (hard) S 2parse count (total) S
6redo size S 1,633,416table fetch by rowid S 1table scan blocks
gotten S 207table scan rows gotten S 100,000buffer is pinned count
S 0consistent gets S 215db block gets S 14,585physical reads S
717physical writes S 0session logical reads S 14,800sorts (disk) S
0sorts (memory) S 0sorts (rows) S 0elapsed time (centiseconds) S
234
Actual Plan for Scenario UPDATE:ANSWER1STAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=215 r=717 w=0 time=2217354 us)'STAT #1
id=2 cnt=1600 pid=1 pos=1 obj=29237 op='TABLE ACCESS FULL T (cr=211
r=205 w=0 time=277281 us)'SQL>SQL>SQL>SQL> @diffList of
values (First
workspace)------------------------------------------------------------UPDATE
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 18 / 72
March 04, 2005 case study.txt
First workspace []: update
List of values (First
scenario)------------------------------------------------------------ANSWER1PROBLEMFirst
scenario []: problem
List of values (Second
workspace)------------------------------------------------------------UPDATESecond
workspace []: update
List of values (Second
scenario)------------------------------------------------------------ANSWER1PROBLEMSecond
scenario []: answer1
Statistic Name UPDATE UPDATEStatistic Type (S=stat, L=Latch)
PROBLEM ANSWER1 Difference----------------------------------------
- -------------- -------------- --------------active checkpoint
queue latch L 10 4 -6cache buffer handles L 54 0 -54channel
operations parent latch L 4 2 -2checkpoint queue latch L 6,935
2,357 -4,578Consistent RBA L 66 5 -61dml lock allocation L 7 3
-4FIB s.o chain latch L 4 0 -4FOB s.o list latch L 4 0 -4hash table
column usage latch L 4 6 2lgwr LWN SCN L 66 5 -61library cache pin
allocation L 90 42 -48list of block allocation L 7 6 -1messages L
258 31 -227mostly latch-free SCN L 66 5 -61post/wait queue L 38 4
-34redo writing L 216 21 -195session timer L 2 0 -2sim partition
latch L 20 2 -18simulator hash latch L 5,867 464 -5,403
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 19 / 72
March 04, 2005 case study.txt
simulator lru latch L 206 91 -115SQL memory manager latch L 2 1
-1SQL memory manager workarea list latch L 134 67 -67transaction
allocation L 1 0 -1undo global data L 693 10 -683active txn count
during cleanout S 2 0 -2buffer is not pinned count S 244 210
-34bytes received via SQL*Net from client S 1,123 1,142 19calls to
get snapshot scn: kcmgss S 340 9 -331calls to kcmgas S 542 178
-364change write time S 65 0 -65cleanout - number of ktugct calls S
150 0 -150cluster key scan block gets S 4 0 -4cluster key scans S 2
0 -2commit cleanouts S 452 0 -452commit cleanouts successfully
completed S 452 0 -452commit txn count during cleanout S 150 0
-150consistent changes S 2 0 -2consistent gets - examination S 155
0 -155CPU used by this session S 175 33 -142CPU used when call
started S 175 33 -142CR blocks created S 2 0 -2data blocks
consistent reads - undo S 2 0 -2records applieddb block changes S
177,204 16,111 -161,093deferred (CURRENT) block cleanout S 2 0
-2applicationsdirty buffers inspected S 2,309 835 -1,474enqueue
releases S 213 4 -209enqueue requests S 215 6 -209free buffer
inspected S 2,819 898 -1,921free buffer requested S 2,339 981
-1,358hot buffers moved to head of LRU S 139 365 226immediate
(CURRENT) block cleanout S 450 0 -450applicationsindex fetch by key
S 2 0 -2index scans kdiixs1 S 11 1 -10leaf node splits S 150 0
-150messages sent S 63 6 -57no work - consistent read gets S 231
209 -22opened cursors cumulative S 18 6 -12pinned buffers inspected
S 60 36 -24prefetched blocks S 176 181 5prefetched blocks aged out
before use S 57 25 -32recursive calls S 121 8 -113
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 20 / 72
March 04, 2005 case study.txt
redo buffer allocation retries S 2 0 -2redo entries S 88,288
8,011 -80,277redo log space requests S 2 0 -2redo log space wait
time S 41 0 -41redo ordering marks S 132 0 -132rollbacks only -
consistent read gets S 2 0 -2session pga memory S 16,336 189,544
173,208shared hash latch upgrades - no wait S 11 1 -10switch
current to new buffer S 150 166 16write clones created in
foreground S 107 12 -95
buffer pool L 0 0 0cache buffers chains L 480,644 65,004
-415,640cache buffers lru chain L 6,850 2,507 -4,343enqueue hash
chains L 444 16 -428enqueues L 126 11 -115library cache L 282 150
-132library cache pin L 178 82 -96redo allocation L 88,471 8,038
-80,433redo copy L 88,333 8,028 -80,305row cache enqueue latch L
204 58 -146row cache objects L 219 61 -158shared pool L 193 136
-57
execute count S 18 6 -12parse count (hard) S 2 2 0parse count
(total) S 18 6 -12redo size S 22,887,828 1,633,416 -21,254,412table
fetch by rowid S 11 1 -10table scan blocks gotten S 207 207 0table
scan rows gotten S 100,000 100,000 0
buffer is pinned count S 0 0 0consistent gets S 563 215 -348db
block gets S 96,896 14,585 -82,311physical reads S 651 717
66physical writes S 0 0 0session logical reads S 97,459 14,800
-82,659sorts (disk) S 0 0 0sorts (memory) S 0 0 0sorts (rows) S 0 0
0
elapsed time S 621 234 -387
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 21 / 72
March 04, 2005 case study.txt
elapsed time (in seconds) S 6.21 2.34 -3.87List of values (Show
actual 10046 STAT
lines)------------------------------------------------------------YESNOShow
actual 10046 STAT lines [YES]:Actual Plan for Scenario
UPDATE:PROBLEMSTAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE
(cr=563 r=651 w=0 time=5998399 us)'STAT #1 id=2 cnt=80000 pid=1
pos=1 obj=29237 op='TABLE ACCESS FULL T (cr=211 r=200 w=0
time=480438 us)'Actual Plan for Scenario UPDATE:ANSWER1STAT #1 id=1
cnt=0 pid=0 pos=1 obj=0 op='UPDATE (cr=215 r=717 w=0 time=2217354
us)'STAT #1 id=2 cnt=1600 pid=1 pos=1 obj=29237 op='TABLE ACCESS
FULL T (cr=211 r=205 w=0 time=277281 us)'
List of values (Show EXPLAIN PLAN
output)------------------------------------------------------------YESNOShow
EXPLAIN PLAN output [YES]:
==========================================================================UPDATE:PROBLEM--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 33333 | 99999 | 22 || 1 | UPDATE | T | | |
||* 2 | TABLE ACCESS FULL | T | 33333 | 99999 | 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2)Note: cpu costing is off
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 22 / 72
March 04, 2005 case study.txt
==========================================================================UPDATE:ANSWER1--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 16667 | 50001 | 22 || 1 | UPDATE | T | | |
||* 2 | TABLE ACCESS FULL | T | 16667 | 50001 | 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2 AND "T"."FLAG"'B')Note: cpu costing is
off==========================================================================SQL>SQL>
get test_ans2
1 update t2 set flag='B'3 where status=24* and flag in (select
flag from flags minus select 'B' from dual )
SQL>SQL>SQL> @dodmlEnter .sql file name (without
extension): test_ans2Enter the workspace name: updateEnter the
scenario name: answer2Display results of SQL (ON/OFF)?:
offCapturing statistics
information...=================================================================Name
of 10046 trace file:
hotsos_ora_3532.trc=================================================================Explain
Plan for Scenario update:answer2
----------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|----------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 83333 | 488K| 26 || 1 | UPDATE | T | | |
|| 2 | NESTED LOOPS | | 83333 | 488K| 26 || 3 | VIEW | VW_NSO_1 | 5
| 15 | 25 |
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 23 / 72
March 04, 2005 case study.txt
| 4 | MINUS | | | | || 5 | SORT UNIQUE | | 5 | 5 | || 6 | INDEX
FULL SCAN | SYS_IOT_TOP_29235 | 5 | 5 | 1 || 7 | TABLE ACCESS FULL|
DUAL | 8168 | | 11 ||* 8 | INDEX RANGE SCAN | T_N3 | 16667 | 50001
|
|----------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
8 - access("T"."STATUS"=2 AND
"T"."FLAG"="VW_NSO_1"."$nso_col_1")Note: cpu costing is
off=================================================================Name
of 10053 trace file:
hotsos_ora_2552.trc=================================================================
Actual Plan for Scenario update:answer2STAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=15 r=494 w=0 time=1203620 us)'STAT #1
id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=15 r=3 w=0
time=40684 us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=0 op='VIEW (cr=4
r=1 w=0 time=15222 us)'STAT #1 id=4 cnt=4 pid=3 pos=1 obj=0
op='MINUS (cr=4 r=1 w=0 time=15205 us)'STAT #1 id=5 cnt=5 pid=4
pos=1 obj=0 op='SORT UNIQUE (cr=1 r=1 w=0 time=15077 us)'STAT #1
id=6 cnt=5 pid=5 pos=1 obj=29236 op='INDEX FULL SCAN
SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=14973 us)'STAT #1 id=7 cnt=1
pid=4 pos=2 obj=222 op='TABLE ACCESS FULL DUAL (cr=3 r=0 w=0
time=84 us)'STAT #1 id=8 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX
RANGE SCAN T_N3 (cr=11 r=2 w=0 time=18340 us)'SQL>SQL>SQL>
@lsscstatList of values
(Workspace)------------------------------------------------------------UPDATEWorkspace
[UPDATE]:
List of values
(Scenario)------------------------------------------------------------ANSWER1ANSWER2PROBLEMScenario
[ANSWER1]: answer2
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 24 / 72
March 04, 2005 case study.txt
Statistic NameStatistic Type (S=stat, L=Latch)
Value---------------------------------------- -
--------------active checkpoint queue latch L 4channel operations
parent latch L 2checkpoint queue latch L 1,641child cursor hash
table L 15Consistent RBA L 4dml lock allocation L 3hash table
column usage latch L 10lgwr LWN SCN L 4library cache load lock L
2library cache pin allocation L 58list of block allocation L
6messages L 25mostly latch-free SCN L 4post/wait queue L 2redo
writing L 18session allocation L 2session idle bit L 17session
timer L 1sim partition latch L 1simulator hash latch L 258simulator
lru latch L 62SQL memory manager latch L 1SQL memory manager
workarea list latch L 71undo global data L 6buffer is not pinned
count S 2bytes received via SQL*Net from client S 1,191bytes sent
via SQL*Net to client S 709calls to get snapshot scn: kcmgss S
8calls to kcmgas S 4consistent gets - examination S 1CPU used by
this session S 11CPU used when call started S 11cursor
authentications S 1db block changes S 4,421dirty buffers inspected
S 538enqueue releases S 2enqueue requests S 4free buffer inspected
S 541free buffer requested S 537hot buffers moved to head of LRU S
222index scans kdiixs1 S 9messages sent S 4no work - consistent
read gets S 7opened cursors cumulative S 7parse time cpu S 2
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 25 / 72
March 04, 2005 case study.txt
parse time elapsed S 13pinned buffers inspected S 3recursive
calls S 5recursive cpu usage S 2redo entries S 2,189shared hash
latch upgrades - no wait S 10SQL*Net roundtrips to/from client S
5table scans (short tables) S 1user calls S 8workarea executions -
optimal S 5write clones created in foreground S 4buffer pool L
0cache buffers chains L 16,101cache buffers lru chain L
1,434enqueue hash chains L 12enqueues L 7library cache L 208library
cache pin L 100redo allocation L 2,217redo copy L 2,209row cache
enqueue latch L 120row cache objects L 123shared pool L 180execute
count S 7parse count (hard) S 2parse count (total) S 7redo size S
638,912table fetch by rowid S 0table scan blocks gotten S 1table
scan rows gotten S 1buffer is pinned count S 2consistent gets S
20db block gets S 2,840physical reads S 498physical writes S
0session logical reads S 2,860sorts (disk) S 0sorts (memory) S
5sorts (rows) S 6,405elapsed time (centiseconds) S 151
Actual Plan for Scenario UPDATE:ANSWER2
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 26 / 72
March 04, 2005 case study.txt
STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE (cr=15 r=494 w=0
time=1203620 us)'STAT #1 id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED
LOOPS (cr=15 r=3 w=0 time=40684 us)'STAT #1 id=3 cnt=4 pid=2 pos=1
obj=0 op='VIEW (cr=4 r=1 w=0 time=15222 us)'STAT #1 id=4 cnt=4
pid=3 pos=1 obj=0 op='MINUS (cr=4 r=1 w=0 time=15205 us)'STAT #1
id=5 cnt=5 pid=4 pos=1 obj=0 op='SORT UNIQUE (cr=1 r=1 w=0
time=15077 us)'STAT #1 id=6 cnt=5 pid=5 pos=1 obj=29236 op='INDEX
FULL SCAN SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=14973 us)'STAT #1
id=7 cnt=1 pid=4 pos=2 obj=222 op='TABLE ACCESS FULL DUAL (cr=3 r=0
w=0 time=84 us)'STAT #1 id=8 cnt=1600 pid=2 pos=2 obj=29241
op='INDEX RANGE SCAN T_N3 (cr=11 r=2 w=0 time=18340
us)'SQL>SQL>SQL>SQL> @hrank updateScenario ranking for
workspace update by elapsed time
Elapsed Time (secs) Scenario Name---------------------
--------------------------------------------------------------------------------
1.510000 ANSWER22.340000 ANSWER16.210000 PROBLEM
SQL>SQL> @diffList of values (First
workspace)------------------------------------------------------------UPDATEFirst
workspace [UPDATE]:
List of values (First
scenario)------------------------------------------------------------ANSWER1ANSWER2PROBLEMFirst
scenario [PROBLEM]:
List of values (Second
workspace)------------------------------------------------------------UPDATESecond
workspace [UPDATE]:
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 27 / 72
March 04, 2005 case study.txt
List of values (Second
scenario)------------------------------------------------------------ANSWER1ANSWER2PROBLEMSecond
scenario [ANSWER1]: answer2
Statistic Name UPDATE UPDATEStatistic Type (S=stat, L=Latch)
PROBLEM ANSWER2 Difference----------------------------------------
- -------------- -------------- --------------active checkpoint
queue latch L 10 4 -6cache buffer handles L 54 0 -54channel
operations parent latch L 4 2 -2checkpoint queue latch L 6,935
1,641 -5,294Consistent RBA L 66 4 -62dml lock allocation L 7 3
-4FIB s.o chain latch L 4 0 -4FOB s.o list latch L 4 0 -4hash table
column usage latch L 4 10 6lgwr LWN SCN L 66 4 -62library cache
load lock L 0 2 2library cache pin allocation L 90 58 -32list of
block allocation L 7 6 -1messages L 258 25 -233mostly latch-free
SCN L 66 4 -62multiblock read objects L 48 0 -48post/wait queue L
38 2 -36redo writing L 216 18 -198session timer L 2 1 -1sim
partition latch L 20 1 -19simulator hash latch L 5,867 258
-5,609simulator lru latch L 206 62 -144SQL memory manager latch L 2
1 -1SQL memory manager workarea list latch L 134 71 -63transaction
allocation L 1 0 -1undo global data L 693 6 -687active txn count
during cleanout S 2 0 -2buffer is not pinned count S 244 2
-242bytes received via SQL*Net from client S 1,123 1,191 68calls to
get snapshot scn: kcmgss S 340 8 -332calls to kcmgas S 542 4
-538change write time S 65 0 -65cleanout - number of ktugct calls S
150 0 -150cluster key scan block gets S 4 0 -4cluster key scans S 2
0 -2commit cleanouts S 452 0 -452
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 28 / 72
March 04, 2005 case study.txt
commit cleanouts successfully completed S 452 0 -452commit txn
count during cleanout S 150 0 -150consistent changes S 2 0
-2consistent gets - examination S 155 1 -154CPU used by this
session S 175 11 -164CPU used when call started S 175 11 -164CR
blocks created S 2 0 -2cursor authentications S 0 1 1data blocks
consistent reads - undo S 2 0 -2records applieddb block changes S
177,204 4,421 -172,783deferred (CURRENT) block cleanout S 2 0
-2applicationsdirty buffers inspected S 2,309 538 -1,771enqueue
releases S 213 2 -211enqueue requests S 215 4 -211free buffer
inspected S 2,819 541 -2,278free buffer requested S 2,339 537
-1,802hot buffers moved to head of LRU S 139 222 83immediate
(CURRENT) block cleanout S 450 0 -450applicationsindex fetch by key
S 2 0 -2index scans kdiixs1 S 11 9 -2leaf node splits S 150 0
-150messages sent S 63 4 -59no work - consistent read gets S 231 7
-224opened cursors cumulative S 18 7 -11parse time cpu S 0 2 2parse
time elapsed S 0 13 13pinned buffers inspected S 60 3 -57prefetched
blocks S 176 0 -176prefetched blocks aged out before use S 57 0
-57recursive calls S 121 5 -116recursive cpu usage S 0 2 2redo
buffer allocation retries S 2 0 -2redo entries S 88,288 2,189
-86,099redo log space requests S 2 0 -2redo log space wait time S
41 0 -41redo ordering marks S 132 0 -132rollbacks only - consistent
read gets S 2 0 -2session pga memory S 16,336 0 -16,336shared hash
latch upgrades - no wait S 11 10 -1switch current to new buffer S
150 0 -150table scans (long tables) S 1 0 -1table scans (short
tables) S 0 1 1
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 29 / 72
March 04, 2005 case study.txt
workarea executions - optimal S 0 5 5write clones created in
foreground S 107 4 -103
buffer pool L 0 0 0cache buffers chains L 480,644 16,101
-464,543cache buffers lru chain L 6,850 1,434 -5,416enqueue hash
chains L 444 12 -432enqueues L 126 7 -119library cache L 282 208
-74library cache pin L 178 100 -78redo allocation L 88,471 2,217
-86,254redo copy L 88,333 2,209 -86,124row cache enqueue latch L
204 120 -84row cache objects L 219 123 -96shared pool L 193 180
-13
execute count S 18 7 -11parse count (hard) S 2 2 0parse count
(total) S 18 7 -11redo size S 22,887,828 638,912 -22,248,916table
fetch by rowid S 11 0 -11table scan blocks gotten S 207 1 -206table
scan rows gotten S 100,000 1 -99,999
buffer is pinned count S 0 2 2consistent gets S 563 20 -543db
block gets S 96,896 2,840 -94,056physical reads S 651 498
-153physical writes S 0 0 0session logical reads S 97,459 2,860
-94,599sorts (disk) S 0 0 0sorts (memory) S 0 5 5sorts (rows) S 0
6,405 6,405
elapsed time S 621 151 -470
elapsed time (in seconds) S 6.21 1.51 -4.70List of values (Show
actual 10046 STAT
lines)------------------------------------------------------------YESNO
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 30 / 72
March 04, 2005 case study.txt
Show actual 10046 STAT lines [YES]:
Actual Plan for Scenario UPDATE:PROBLEMSTAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=563 r=651 w=0 time=5998399 us)'STAT #1
id=2 cnt=80000 pid=1 pos=1 obj=29237 op='TABLE ACCESS FULL T
(cr=211 r=200 w=0 time=480438 us)'Actual Plan for Scenario
UPDATE:ANSWER2STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE
(cr=15 r=494 w=0 time=1203620 us)'STAT #1 id=2 cnt=1600 pid=1 pos=1
obj=0 op='NESTED LOOPS (cr=15 r=3 w=0 time=40684 us)'STAT #1 id=3
cnt=4 pid=2 pos=1 obj=0 op='VIEW (cr=4 r=1 w=0 time=15222 us)'STAT
#1 id=4 cnt=4 pid=3 pos=1 obj=0 op='MINUS (cr=4 r=1 w=0 time=15205
us)'STAT #1 id=5 cnt=5 pid=4 pos=1 obj=0 op='SORT UNIQUE (cr=1 r=1
w=0 time=15077 us)'STAT #1 id=6 cnt=5 pid=5 pos=1 obj=29236
op='INDEX FULL SCAN SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=14973
us)'STAT #1 id=7 cnt=1 pid=4 pos=2 obj=222 op='TABLE ACCESS FULL
DUAL (cr=3 r=0 w=0 time=84 us)'STAT #1 id=8 cnt=1600 pid=2 pos=2
obj=29241 op='INDEX RANGE SCAN T_N3 (cr=11 r=2 w=0 time=18340
us)'
List of values (Show EXPLAIN PLAN
output)------------------------------------------------------------YESNOShow
EXPLAIN PLAN output [YES]:
==========================================================================UPDATE:PROBLEM--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 33333 | 99999 | 22 || 1 | UPDATE | T | | |
||* 2 | TABLE ACCESS FULL | T | 33333 | 99999 | 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2)Note: cpu costing is off
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 31 / 72
March 04, 2005 case study.txt
==========================================================================UPDATE:ANSWER2----------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|----------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 83333 | 488K| 26 || 1 | UPDATE | T | | |
|| 2 | NESTED LOOPS | | 83333 | 488K| 26 || 3 | VIEW | VW_NSO_1 | 5
| 15 | 25 || 4 | MINUS | | | | || 5 | SORT UNIQUE | | 5 | 5 | || 6
| INDEX FULL SCAN | SYS_IOT_TOP_29235 | 5 | 5 | 1 || 7 | TABLE
ACCESS FULL| DUAL | 8168 | | 11 ||* 8 | INDEX RANGE SCAN | T_N3 |
16667 | 50001 |
|----------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
8 - access("T"."STATUS"=2 AND
"T"."FLAG"="VW_NSO_1"."$nso_col_1")Note: cpu costing is
off==========================================================================SQL>SQL>
@diffList of values (First
workspace)------------------------------------------------------------UPDATEFirst
workspace [UPDATE]:
List of values (First
scenario)------------------------------------------------------------ANSWER1ANSWER2PROBLEMFirst
scenario [PROBLEM]: answer1
List of values (Second
workspace)------------------------------------------------------------UPDATE
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 32 / 72
March 04, 2005 case study.txt
Second workspace [UPDATE]:
List of values (Second
scenario)------------------------------------------------------------ANSWER1ANSWER2PROBLEMSecond
scenario [ANSWER2]:
Statistic Name UPDATE UPDATEStatistic Type (S=stat, L=Latch)
ANSWER1 ANSWER2 Difference----------------------------------------
- -------------- -------------- --------------checkpoint queue
latch L 2,357 1,641 -716Consistent RBA L 5 4 -1hash table column
usage latch L 6 10 4lgwr LWN SCN L 5 4 -1library cache load lock L
0 2 2library cache pin allocation L 42 58 16messages L 31 25
-6mostly latch-free SCN L 5 4 -1multiblock read objects L 48 0
-48post/wait queue L 4 2 -2redo writing L 21 18 -3session timer L 0
1 1sim partition latch L 2 1 -1simulator hash latch L 464 258
-206simulator lru latch L 91 62 -29SQL memory manager workarea list
latch L 67 71 4undo global data L 10 6 -4buffer is not pinned count
S 210 2 -208bytes received via SQL*Net from client S 1,142 1,191
49calls to get snapshot scn: kcmgss S 9 8 -1calls to kcmgas S 178 4
-174consistent gets - examination S 0 1 1CPU used by this session S
33 11 -22CPU used when call started S 33 11 -22cursor
authentications S 0 1 1db block changes S 16,111 4,421 -11,690dirty
buffers inspected S 835 538 -297enqueue releases S 4 2 -2enqueue
requests S 6 4 -2free buffer inspected S 898 541 -357free buffer
requested S 981 537 -444hot buffers moved to head of LRU S 365 222
-143index scans kdiixs1 S 1 9 8
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 33 / 72
March 04, 2005 case study.txt
messages sent S 6 4 -2no work - consistent read gets S 209 7
-202opened cursors cumulative S 6 7 1parse time cpu S 0 2 2parse
time elapsed S 0 13 13pinned buffers inspected S 36 3 -33prefetched
blocks S 181 0 -181prefetched blocks aged out before use S 25 0
-25recursive calls S 8 5 -3recursive cpu usage S 0 2 2redo entries
S 8,011 2,189 -5,822session pga memory S 189,544 0 -189,544shared
hash latch upgrades - no wait S 1 10 9switch current to new buffer
S 166 0 -166table scans (long tables) S 1 0 -1table scans (short
tables) S 0 1 1workarea executions - optimal S 0 5 5write clones
created in foreground S 12 4 -8
buffer pool L 0 0 0cache buffers chains L 65,004 16,101
-48,903cache buffers lru chain L 2,507 1,434 -1,073enqueue hash
chains L 16 12 -4enqueues L 11 7 -4library cache L 150 208
58library cache pin L 82 100 18redo allocation L 8,038 2,217
-5,821redo copy L 8,028 2,209 -5,819row cache enqueue latch L 58
120 62row cache objects L 61 123 62shared pool L 136 180 44
execute count S 6 7 1parse count (hard) S 2 2 0parse count
(total) S 6 7 1redo size S 1,633,416 638,912 -994,504table fetch by
rowid S 1 0 -1table scan blocks gotten S 207 1 -206table scan rows
gotten S 100,000 1 -99,999
buffer is pinned count S 0 2 2consistent gets S 215 20 -195db
block gets S 14,585 2,840 -11,745physical reads S 717 498
-219physical writes S 0 0 0
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 34 / 72
March 04, 2005 case study.txt
session logical reads S 14,800 2,860 -11,940sorts (disk) S 0 0
0sorts (memory) S 0 5 5sorts (rows) S 0 6,405 6,405
elapsed time S 234 151 -83
elapsed time (in seconds) S 2.34 1.51 -0.83List of values (Show
actual 10046 STAT
lines)------------------------------------------------------------YESNOShow
actual 10046 STAT lines [YES]:
Actual Plan for Scenario UPDATE:ANSWER1STAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=215 r=717 w=0 time=2217354 us)'STAT #1
id=2 cnt=1600 pid=1 pos=1 obj=29237 op='TABLE ACCESS FULL T (cr=211
r=205 w=0 time=277281 us)'Actual Plan for Scenario
UPDATE:ANSWER2STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE
(cr=15 r=494 w=0 time=1203620 us)'STAT #1 id=2 cnt=1600 pid=1 pos=1
obj=0 op='NESTED LOOPS (cr=15 r=3 w=0 time=40684 us)'STAT #1 id=3
cnt=4 pid=2 pos=1 obj=0 op='VIEW (cr=4 r=1 w=0 time=15222 us)'STAT
#1 id=4 cnt=4 pid=3 pos=1 obj=0 op='MINUS (cr=4 r=1 w=0 time=15205
us)'STAT #1 id=5 cnt=5 pid=4 pos=1 obj=0 op='SORT UNIQUE (cr=1 r=1
w=0 time=15077 us)'STAT #1 id=6 cnt=5 pid=5 pos=1 obj=29236
op='INDEX FULL SCAN SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=14973
us)'STAT #1 id=7 cnt=1 pid=4 pos=2 obj=222 op='TABLE ACCESS FULL
DUAL (cr=3 r=0 w=0 time=84 us)'STAT #1 id=8 cnt=1600 pid=2 pos=2
obj=29241 op='INDEX RANGE SCAN T_N3 (cr=11 r=2 w=0 time=18340
us)'
List of values (Show EXPLAIN PLAN
output)------------------------------------------------------------YESNOShow
EXPLAIN PLAN output [YES]:
==========================================================================UPDATE:ANSWER1
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 35 / 72
March 04, 2005 case study.txt
--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 16667 | 50001 | 22 || 1 | UPDATE | T | | |
||* 2 | TABLE ACCESS FULL | T | 16667 | 50001 | 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2 AND "T"."FLAG"'B')Note: cpu costing is
off==========================================================================UPDATE:ANSWER2----------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|----------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 83333 | 488K| 26 || 1 | UPDATE | T | | |
|| 2 | NESTED LOOPS | | 83333 | 488K| 26 || 3 | VIEW | VW_NSO_1 | 5
| 15 | 25 || 4 | MINUS | | | | || 5 | SORT UNIQUE | | 5 | 5 | || 6
| INDEX FULL SCAN | SYS_IOT_TOP_29235 | 5 | 5 | 1 || 7 | TABLE
ACCESS FULL| DUAL | 8168 | | 11 ||* 8 | INDEX RANGE SCAN | T_N3 |
16667 | 50001 |
|----------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
8 - access("T"."STATUS"=2 AND
"T"."FLAG"="VW_NSO_1"."$nso_col_1")Note: cpu costing is
off==========================================================================SQL>SQL>SQL>
get test_ans3
1 update t2 set flag='B'3 where status=24* and flag in (select
flag from flags where flag != 'B')
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 36 / 72
March 04, 2005 case study.txt
SQL>SQL>SQL> @dodmlEnter .sql file name (without
extension): test_ans3Enter the workspace name: updateEnter the
scenario name: answer3Display results of SQL (ON/OFF)?:
offCapturing statistics
information...=================================================================Name
of 10046 trace file:
hotsos_ora_2480.trc=================================================================Explain
Plan for Scenario update:answer3
---------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|---------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 33333 | 130K| 2 || 1 | UPDATE | T | | | ||
2 | NESTED LOOPS | | 33333 | 130K| 2 ||* 3 | INDEX FULL SCAN |
SYS_IOT_TOP_29235 | 4 | 4 | 1 ||* 4 | INDEX RANGE SCAN | T_N3 |
8333 | 24999 |
|---------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
3 - filter("FLAGS"."FLAG"'B')4 - access("T"."STATUS"=2 AND
"T"."FLAG"="FLAGS"."FLAG")
Note: cpu costing is
off=================================================================Name
of 10053 trace file:
hotsos_ora_1200.trc=================================================================
Actual Plan for Scenario update:answer3STAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=12 r=212 w=0 time=666891 us)'STAT #1
id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=12 r=2 w=0
time=29875 us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=29236 op='INDEX
FULL SCAN SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=13743 us)'STAT #1
id=4 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX RANGE SCAN T_N3
(cr=11 r=1 w=0 time=11135 us)'SQL>SQL>SQL> @lsscstat
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 37 / 72
March 04, 2005 case study.txt
List of values
(Workspace)------------------------------------------------------------UPDATEWorkspace
[UPDATE]:
List of values
(Scenario)------------------------------------------------------------ANSWER1ANSWER2ANSWER3PROBLEMScenario
[ANSWER2]: answer3
Statistic NameStatistic Type (S=stat, L=Latch)
Value---------------------------------------- -
--------------active checkpoint queue latch L 4checkpoint queue
latch L 910child cursor hash table L 14Consistent RBA L 3dml lock
allocation L 3hash table column usage latch L 15lgwr LWN SCN L
3library cache pin allocation L 42list of block allocation L
6messages L 22mostly latch-free SCN L 3redo writing L 13session
idle bit L 16simulator hash latch L 203simulator lru latch L 29SQL
memory manager workarea list latch L 4undo global data L 6buffer is
not pinned count S 1bytes received via SQL*Net from client S
1,181bytes sent via SQL*Net to client S 709calls to get snapshot
scn: kcmgss S 3calls to kcmgas S 1consistent gets - examination S
1CPU used by this session S 12CPU used when call started S 12db
block changes S 4,421dirty buffers inspected S 2enqueue releases S
2
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 38 / 72
March 04, 2005 case study.txt
enqueue requests S 4free buffer inspected S 2free buffer
requested S 247hot buffers moved to head of LRU S 303index scans
kdiixs1 S 5messages sent S 3no work - consistent read gets S
6opened cursors cumulative S 5redo entries S 2,189shared hash latch
upgrades - no wait S 6SQL*Net roundtrips to/from client S 5user
calls S 8workarea executions - optimal S 4write clones created in
foreground S 1buffer pool L 0cache buffers chains L 13,914cache
buffers lru chain L 504enqueue hash chains L 10enqueues L 4library
cache L 156library cache pin L 78redo allocation L 2,212redo copy L
2,206row cache enqueue latch L 74row cache objects L 77shared pool
L 152execute count S 5parse count (hard) S 2parse count (total) S
5redo size S 638,912table fetch by rowid S 0table scan blocks
gotten S 0table scan rows gotten S 0buffer is pinned count S
2consistent gets S 12db block gets S 2,840physical reads S
212physical writes S 0session logical reads S 2,852sorts (disk) S
0sorts (memory) S 2sorts (rows) S 6,400elapsed time (centiseconds)
S 102
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 39 / 72
March 04, 2005 case study.txt
Actual Plan for Scenario UPDATE:ANSWER3STAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=12 r=212 w=0 time=666891 us)'STAT #1
id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=12 r=2 w=0
time=29875 us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=29236 op='INDEX
FULL SCAN SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=13743 us)'STAT #1
id=4 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX RANGE SCAN T_N3
(cr=11 r=1 w=0 time=11135 us)'SQL>SQL>SQL>SQL> @hrank
updateScenario ranking for workspace update by elapsed time
Elapsed Time (secs) Scenario Name---------------------
--------------------------------------------------------------------------------
1.020000 ANSWER31.510000 ANSWER22.340000 ANSWER16.210000
PROBLEM
SQL> @diffList of values (First
workspace)------------------------------------------------------------UPDATEFirst
workspace [UPDATE]:
List of values (First
scenario)------------------------------------------------------------ANSWER1ANSWER2ANSWER3PROBLEMFirst
scenario [ANSWER1]: problem
List of values (Second
workspace)------------------------------------------------------------UPDATESecond
workspace [UPDATE]:
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 40 / 72
March 04, 2005 case study.txt
List of values (Second
scenario)------------------------------------------------------------ANSWER1ANSWER2ANSWER3PROBLEMSecond
scenario [ANSWER2]: answer3
Statistic Name UPDATE UPDATEStatistic Type (S=stat, L=Latch)
PROBLEM ANSWER3 Difference----------------------------------------
- -------------- -------------- --------------active checkpoint
queue latch L 10 4 -6cache buffer handles L 54 0 -54channel
operations parent latch L 4 0 -4checkpoint queue latch L 6,935 910
-6,025child cursor hash table L 15 14 -1Consistent RBA L 66 3
-63dml lock allocation L 7 3 -4FIB s.o chain latch L 4 0 -4FOB s.o
list latch L 4 0 -4hash table column usage latch L 4 15 11lgwr LWN
SCN L 66 3 -63library cache pin allocation L 90 42 -48list of block
allocation L 7 6 -1messages L 258 22 -236mostly latch-free SCN L 66
3 -63multiblock read objects L 48 0 -48post/wait queue L 38 0
-38redo writing L 216 13 -203session allocation L 2 0 -2session
idle bit L 17 16 -1session timer L 2 0 -2sim partition latch L 20 0
-20simulator hash latch L 5,867 203 -5,664simulator lru latch L 206
29 -177SQL memory manager latch L 2 0 -2SQL memory manager workarea
list latch L 134 4 -130transaction allocation L 1 0 -1undo global
data L 693 6 -687active txn count during cleanout S 2 0 -2buffer is
not pinned count S 244 1 -243bytes received via SQL*Net from client
S 1,123 1,181 58calls to get snapshot scn: kcmgss S 340 3 -337calls
to kcmgas S 542 1 -541change write time S 65 0 -65
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 41 / 72
March 04, 2005 case study.txt
cleanout - number of ktugct calls S 150 0 -150cluster key scan
block gets S 4 0 -4cluster key scans S 2 0 -2commit cleanouts S 452
0 -452commit cleanouts successfully completed S 452 0 -452commit
txn count during cleanout S 150 0 -150consistent changes S 2 0
-2consistent gets - examination S 155 1 -154CPU used by this
session S 175 12 -163CPU used when call started S 175 12 -163CR
blocks created S 2 0 -2data blocks consistent reads - undo S 2 0
-2records applieddb block changes S 177,204 4,421 -172,783deferred
(CURRENT) block cleanout S 2 0 -2applicationsdirty buffers
inspected S 2,309 2 -2,307enqueue releases S 213 2 -211enqueue
requests S 215 4 -211free buffer inspected S 2,819 2 -2,817free
buffer requested S 2,339 247 -2,092hot buffers moved to head of LRU
S 139 303 164immediate (CURRENT) block cleanout S 450 0
-450applicationsindex fetch by key S 2 0 -2index scans kdiixs1 S 11
5 -6leaf node splits S 150 0 -150messages sent S 63 3 -60no work -
consistent read gets S 231 6 -225opened cursors cumulative S 18 5
-13pinned buffers inspected S 60 0 -60prefetched blocks S 176 0
-176prefetched blocks aged out before use S 57 0 -57recursive calls
S 121 0 -121redo buffer allocation retries S 2 0 -2redo entries S
88,288 2,189 -86,099redo log space requests S 2 0 -2redo log space
wait time S 41 0 -41redo ordering marks S 132 0 -132rollbacks only
- consistent read gets S 2 0 -2session pga memory S 16,336 0
-16,336shared hash latch upgrades - no wait S 11 6 -5switch current
to new buffer S 150 0 -150table scans (long tables) S 1 0
-1workarea executions - optimal S 0 4 4
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 42 / 72
March 04, 2005 case study.txt
write clones created in foreground S 107 1 -106
buffer pool L 0 0 0cache buffers chains L 480,644 13,914
-466,730cache buffers lru chain L 6,850 504 -6,346enqueue hash
chains L 444 10 -434enqueues L 126 4 -122library cache L 282 156
-126library cache pin L 178 78 -100redo allocation L 88,471 2,212
-86,259redo copy L 88,333 2,206 -86,127row cache enqueue latch L
204 74 -130row cache objects L 219 77 -142shared pool L 193 152
-41
execute count S 18 5 -13parse count (hard) S 2 2 0parse count
(total) S 18 5 -13redo size S 22,887,828 638,912 -22,248,916table
fetch by rowid S 11 0 -11table scan blocks gotten S 207 0 -207table
scan rows gotten S 100,000 0 -100,000
buffer is pinned count S 0 2 2consistent gets S 563 12 -551db
block gets S 96,896 2,840 -94,056physical reads S 651 212
-439physical writes S 0 0 0session logical reads S 97,459 2,852
-94,607sorts (disk) S 0 0 0sorts (memory) S 0 2 2sorts (rows) S 0
6,400 6,400
elapsed time S 621 102 -519
elapsed time (in seconds) S 6.21 1.02 -5.19List of values (Show
actual 10046 STAT
lines)------------------------------------------------------------YESNO
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 43 / 72
March 04, 2005 case study.txt
Show actual 10046 STAT lines [YES]:
Actual Plan for Scenario UPDATE:PROBLEMSTAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=563 r=651 w=0 time=5998399 us)'STAT #1
id=2 cnt=80000 pid=1 pos=1 obj=29237 op='TABLE ACCESS FULL T
(cr=211 r=200 w=0 time=480438 us)'Actual Plan for Scenario
UPDATE:ANSWER3STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE
(cr=12 r=212 w=0 time=666891 us)'STAT #1 id=2 cnt=1600 pid=1 pos=1
obj=0 op='NESTED LOOPS (cr=12 r=2 w=0 time=29875 us)'STAT #1 id=3
cnt=4 pid=2 pos=1 obj=29236 op='INDEX FULL SCAN SYS_IOT_TOP_29235
(cr=1 r=1 w=0 time=13743 us)'STAT #1 id=4 cnt=1600 pid=2 pos=2
obj=29241 op='INDEX RANGE SCAN T_N3 (cr=11 r=1 w=0 time=11135
us)'
List of values (Show EXPLAIN PLAN
output)------------------------------------------------------------YESNOShow
EXPLAIN PLAN output [YES]:
==========================================================================UPDATE:PROBLEM--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 33333 | 99999 | 22 || 1 | UPDATE | T | | |
||* 2 | TABLE ACCESS FULL | T | 33333 | 99999 | 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2)Note: cpu costing is
off==========================================================================UPDATE:ANSWER3---------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost |
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 44 / 72
March 04, 2005 case study.txt
---------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 33333 | 130K| 2 || 1 | UPDATE | T | | | ||
2 | NESTED LOOPS | | 33333 | 130K| 2 ||* 3 | INDEX FULL SCAN |
SYS_IOT_TOP_29235 | 4 | 4 | 1 ||* 4 | INDEX RANGE SCAN | T_N3 |
8333 | 24999 |
|---------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
3 - filter("FLAGS"."FLAG"'B')4 - access("T"."STATUS"=2 AND
"T"."FLAG"="FLAGS"."FLAG")
Note: cpu costing is
off==========================================================================SQL>SQL>SQL>
@diffList of values (First
workspace)------------------------------------------------------------UPDATEFirst
workspace [UPDATE]:
List of values (First
scenario)------------------------------------------------------------ANSWER1ANSWER2ANSWER3PROBLEMFirst
scenario [PROBLEM]: answer2
List of values (Second
workspace)------------------------------------------------------------UPDATESecond
workspace [UPDATE]:
List of values (Second
scenario)------------------------------------------------------------ANSWER1
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 45 / 72
March 04, 2005 case study.txt
ANSWER2ANSWER3PROBLEMSecond scenario [ANSWER3]:
Statistic Name UPDATE UPDATEStatistic Type (S=stat, L=Latch)
ANSWER2 ANSWER3 Difference----------------------------------------
- -------------- -------------- --------------channel operations
parent latch L 2 0 -2checkpoint queue latch L 1,641 910 -731child
cursor hash table L 15 14 -1Consistent RBA L 4 3 -1hash table
column usage latch L 10 15 5lgwr LWN SCN L 4 3 -1library cache load
lock L 2 0 -2library cache pin allocation L 58 42 -16messages L 25
22 -3mostly latch-free SCN L 4 3 -1post/wait queue L 2 0 -2redo
writing L 18 13 -5session allocation L 2 0 -2session idle bit L 17
16 -1session timer L 1 0 -1sim partition latch L 1 0 -1simulator
hash latch L 258 203 -55simulator lru latch L 62 29 -33SQL memory
manager latch L 1 0 -1SQL memory manager workarea list latch L 71 4
-67buffer is not pinned count S 2 1 -1bytes received via SQL*Net
from client S 1,191 1,181 -10calls to get snapshot scn: kcmgss S 8
3 -5calls to kcmgas S 4 1 -3CPU used by this session S 11 12 1CPU
used when call started S 11 12 1cursor authentications S 1 0
-1dirty buffers inspected S 538 2 -536free buffer inspected S 541 2
-539free buffer requested S 537 247 -290hot buffers moved to head
of LRU S 222 303 81index scans kdiixs1 S 9 5 -4messages sent S 4 3
-1no work - consistent read gets S 7 6 -1opened cursors cumulative
S 7 5 -2parse time cpu S 2 0 -2parse time elapsed S 13 0 -13pinned
buffers inspected S 3 0 -3
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 46 / 72
March 04, 2005 case study.txt
recursive calls S 5 0 -5recursive cpu usage S 2 0 -2shared hash
latch upgrades - no wait S 10 6 -4table scans (short tables) S 1 0
-1workarea executions - optimal S 5 4 -1write clones created in
foreground S 4 1 -3
buffer pool L 0 0 0cache buffers chains L 16,101 13,914
-2,187cache buffers lru chain L 1,434 504 -930enqueue hash chains L
12 10 -2enqueues L 7 4 -3library cache L 208 156 -52library cache
pin L 100 78 -22redo allocation L 2,217 2,212 -5redo copy L 2,209
2,206 -3row cache enqueue latch L 120 74 -46row cache objects L 123
77 -46shared pool L 180 152 -28
execute count S 7 5 -2parse count (hard) S 2 2 0parse count
(total) S 7 5 -2redo size S 638,912 638,912 0table fetch by rowid S
0 0 0table scan blocks gotten S 1 0 -1table scan rows gotten S 1 0
-1
buffer is pinned count S 2 2 0consistent gets S 20 12 -8db block
gets S 2,840 2,840 0physical reads S 498 212 -286physical writes S
0 0 0session logical reads S 2,860 2,852 -8sorts (disk) S 0 0
0sorts (memory) S 5 2 -3sorts (rows) S 6,405 6,400 -5
elapsed time S 151 102 -49
elapsed time (in seconds) S 1.51 1.02 -0.49
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 47 / 72
March 04, 2005 case study.txt
List of values (Show actual 10046 STAT
lines)------------------------------------------------------------YESNOShow
actual 10046 STAT lines [YES]:
Actual Plan for Scenario UPDATE:ANSWER2STAT #1 id=1 cnt=0 pid=0
pos=1 obj=0 op='UPDATE (cr=15 r=494 w=0 time=1203620 us)'STAT #1
id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=15 r=3 w=0
time=40684 us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=0 op='VIEW (cr=4
r=1 w=0 time=15222 us)'STAT #1 id=4 cnt=4 pid=3 pos=1 obj=0
op='MINUS (cr=4 r=1 w=0 time=15205 us)'STAT #1 id=5 cnt=5 pid=4
pos=1 obj=0 op='SORT UNIQUE (cr=1 r=1 w=0 time=15077 us)'STAT #1
id=6 cnt=5 pid=5 pos=1 obj=29236 op='INDEX FULL SCAN
SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=14973 us)'STAT #1 id=7 cnt=1
pid=4 pos=2 obj=222 op='TABLE ACCESS FULL DUAL (cr=3 r=0 w=0
time=84 us)'STAT #1 id=8 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX
RANGE SCAN T_N3 (cr=11 r=2 w=0 time=18340 us)'Actual Plan for
Scenario UPDATE:ANSWER3STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0
op='UPDATE (cr=12 r=212 w=0 time=666891 us)'STAT #1 id=2 cnt=1600
pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=12 r=2 w=0 time=29875
us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=29236 op='INDEX FULL SCAN
SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=13743 us)'STAT #1 id=4
cnt=1600 pid=2 pos=2 obj=29241 op='INDEX RANGE SCAN T_N3 (cr=11 r=1
w=0 time=11135 us)'
List of values (Show EXPLAIN PLAN
output)------------------------------------------------------------YESNOShow
EXPLAIN PLAN output [YES]:
==========================================================================UPDATE:ANSWER2----------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|----------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 83333 | 488K| 26 || 1 | UPDATE | T | | |
|| 2 | NESTED LOOPS | | 83333 | 488K| 26 || 3 | VIEW | VW_NSO_1 | 5
| 15 | 25 || 4 | MINUS | | | | || 5 | SORT UNIQUE | | 5 | 5 | |
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 48 / 72
March 04, 2005 case study.txt
| 6 | INDEX FULL SCAN | SYS_IOT_TOP_29235 | 5 | 5 | 1 || 7 |
TABLE ACCESS FULL| DUAL | 8168 | | 11 ||* 8 | INDEX RANGE SCAN |
T_N3 | 16667 | 50001 |
|----------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
8 - access("T"."STATUS"=2 AND
"T"."FLAG"="VW_NSO_1"."$nso_col_1")Note: cpu costing is
off==========================================================================UPDATE:ANSWER3---------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|---------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 33333 | 130K| 2 || 1 | UPDATE | T | | | ||
2 | NESTED LOOPS | | 33333 | 130K| 2 ||* 3 | INDEX FULL SCAN |
SYS_IOT_TOP_29235 | 4 | 4 | 1 ||* 4 | INDEX RANGE SCAN | T_N3 |
8333 | 24999 |
|---------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
3 - filter("FLAGS"."FLAG"'B')4 - access("T"."STATUS"=2 AND
"T"."FLAG"="FLAGS"."FLAG")
Note: cpu costing is
off==========================================================================SQL>SQL>SQL>
analyze table t compute statistics for columns status ;Table
analyzed.
SQL>SQL>SQL> get test_ans1
1 update t2 set flag='B'3 where status=2
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 49 / 72
March 04, 2005 case study.txt
4* and flag != 'B'SQL>SQL> @dodmlEnter .sql file name
(without extension): test_ans1Enter the workspace name: updateEnter
the scenario name: answer1_histDisplay results of SQL (ON/OFF)?:
offCapturing statistics
information...=================================================================Name
of 10046 trace file:
hotsos_ora_2004.trc=================================================================Explain
Plan for Scenario update:answer1_hist
--------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|--------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 40000 | 117K| 22 || 1 | UPDATE | T | | |
||* 2 | TABLE ACCESS FULL | T | 40000 | 117K| 22
|--------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
2 - filter("T"."STATUS"=2 AND "T"."FLAG"'B')Note: cpu costing is
off=================================================================Name
of 10053 trace file:
hotsos_ora_1088.trc=================================================================
Actual Plan for Scenario update:answer1_histSTAT #1 id=1 cnt=0
pid=0 pos=1 obj=0 op='UPDATE (cr=215 r=364 w=0 time=1577867
us)'STAT #1 id=2 cnt=1600 pid=1 pos=1 obj=29237 op='TABLE ACCESS
FULL T (cr=211 r=4 w=0 time=72003 us)'SQL>SQL>SQL>
@lsscstatList of values
(Workspace)------------------------------------------------------------UPDATEWorkspace
[UPDATE]:
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 50 / 72
March 04, 2005 case study.txt
List of values
(Scenario)------------------------------------------------------------ANSWER1ANSWER1_HISTANSWER2ANSWER3PROBLEMScenario
[ANSWER3]: answer1_hist
Statistic NameStatistic Type (S=stat, L=Latch)
Value---------------------------------------- -
--------------active checkpoint queue latch L 4channel operations
parent latch L 2checkpoint queue latch L 2,101child cursor hash
table L 15Consistent RBA L 7dml lock allocation L 3hash table
column usage latch L 6lgwr LWN SCN L 7library cache pin allocation
L 42list of block allocation L 5messages L 39mostly latch-free SCN
L 7multiblock read objects L 2post/wait queue L 4redo writing L
28session allocation L 2session idle bit L 17session timer L 1sim
partition latch L 1simulator hash latch L 356simulator lru latch L
58SQL memory manager latch L 1SQL memory manager workarea list
latch L 67undo global data L 11buffer is not pinned count S
210bytes received via SQL*Net from client S 1,142bytes sent via
SQL*Net to client S 709calls to get snapshot scn: kcmgss S 9calls
to kcmgas S 209change write time S 5CPU used by this session S
23CPU used when call started S 23
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 51 / 72
March 04, 2005 case study.txt
db block changes S 16,112dirty buffers inspected S 824enqueue
releases S 4enqueue requests S 6free buffer inspected S 985free
buffer requested S 658hot buffers moved to head of LRU S 65index
scans kdiixs1 S 1messages sent S 5no work - consistent read gets S
209opened cursors cumulative S 6parse time cpu S 1parse time
elapsed S 1pinned buffers inspected S 9prefetched blocks S
2recursive calls S 8redo entries S 8,011shared hash latch upgrades
- no wait S 1SQL*Net roundtrips to/from client S 5switch current to
new buffer S 153table scans (long tables) S 1user calls S 8write
clones created in foreground S 56buffer pool L 0cache buffers
chains L 64,161cache buffers lru chain L 1,957enqueue hash chains L
20enqueues L 15library cache L 150library cache pin L 82redo
allocation L 8,043redo copy L 8,029row cache enqueue latch L 58row
cache objects L 62shared pool L 130execute count S 6parse count
(hard) S 2parse count (total) S 6redo size S 1,633,476table fetch
by rowid S 1table scan blocks gotten S 207table scan rows gotten S
100,000buffer is pinned count S 0consistent gets S 215db block gets
S 14,588
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 52 / 72
March 04, 2005 case study.txt
physical reads S 364physical writes S 0session logical reads S
14,803sorts (disk) S 0sorts (memory) S 0sorts (rows) S 0elapsed
time (centiseconds) S 169
Actual Plan for Scenario UPDATE:ANSWER1_HISTSTAT #1 id=1 cnt=0
pid=0 pos=1 obj=0 op='UPDATE (cr=215 r=364 w=0 time=1577867
us)'STAT #1 id=2 cnt=1600 pid=1 pos=1 obj=29237 op='TABLE ACCESS
FULL T (cr=211 r=4 w=0 time=72003 us)'SQL>SQL>SQL>SQL>
get test_ans2
1 update t2 set flag='B'3 where status=24* and flag in (select
flag from flags minus select 'B' from dual )
SQL>SQL> @dodmlEnter .sql file name (without extension):
test_ans2Enter the workspace name: updateEnter the scenario name:
answer2_histDisplay results of SQL (ON/OFF)?: offCapturing
statistics
information...=================================================================Name
of 10046 trace file:
hotsos_ora_812.trc=================================================================Explain
Plan for Scenario update:answer2_hist
----------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|----------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 200K| 1171K| 26 || 1 | UPDATE | T | | | ||
2 | NESTED LOOPS | | 200K| 1171K| 26 || 3 | VIEW | VW_NSO_1 | 5 |
15 | 25 || 4 | MINUS | | | | || 5 | SORT UNIQUE | | 5 | 5 | |
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 53 / 72
March 04, 2005 case study.txt
| 6 | INDEX FULL SCAN | SYS_IOT_TOP_29235 | 5 | 5 | 1 || 7 |
TABLE ACCESS FULL| DUAL | 8168 | | 11 ||* 8 | INDEX RANGE SCAN |
T_N3 | 40000 | 117K|
|----------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
8 - access("T"."STATUS"=2 AND
"T"."FLAG"="VW_NSO_1"."$nso_col_1")Note: cpu costing is
off=================================================================Name
of 10053 trace file:
hotsos_ora_2760.trc=================================================================
Actual Plan for Scenario update:answer2_histSTAT #1 id=1 cnt=0
pid=0 pos=1 obj=0 op='UPDATE (cr=15 r=411 w=0 time=1185803 us)'STAT
#1 id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=15 r=2 w=0
time=30175 us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=0 op='VIEW (cr=4
r=1 w=0 time=13335 us)'STAT #1 id=4 cnt=4 pid=3 pos=1 obj=0
op='MINUS (cr=4 r=1 w=0 time=13318 us)'STAT #1 id=5 cnt=5 pid=4
pos=1 obj=0 op='SORT UNIQUE (cr=1 r=1 w=0 time=13199 us)'STAT #1
id=6 cnt=5 pid=5 pos=1 obj=29236 op='INDEX FULL SCAN
SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=13100 us)'STAT #1 id=7 cnt=1
pid=4 pos=2 obj=222 op='TABLE ACCESS FULL DUAL (cr=3 r=0 w=0
time=76 us)'STAT #1 id=8 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX
RANGE SCAN T_N3 (cr=11 r=1 w=0 time=11444 us)'SQL>SQL>SQL>
@lsscstatList of values
(Workspace)------------------------------------------------------------UPDATEWorkspace
[UPDATE]:
List of values
(Scenario)------------------------------------------------------------ANSWER1ANSWER1_HISTANSWER2ANSWER2_HISTANSWER3PROBLEMScenario
[ANSWER1_HIST]: answer2_hist
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 54 / 72
March 04, 2005 case study.txt
Statistic NameStatistic Type (S=stat, L=Latch)
Value---------------------------------------- -
--------------active checkpoint queue latch L 2checkpoint queue
latch L 1,113child cursor hash table L 15Consistent RBA L 4dml lock
allocation L 3hash table column usage latch L 10lgwr LWN SCN L
4library cache pin allocation L 46list of block allocation L
6messages L 17mostly latch-free SCN L 4redo writing L 14session
idle bit L 16simulator hash latch L 206simulator lru latch L 54SQL
memory manager workarea list latch L 4undo global data L 7buffer is
not pinned count S 2bytes received via SQL*Net from client S
1,191bytes sent via SQL*Net to client S 709calls to get snapshot
scn: kcmgss S 6calls to kcmgas S 1consistent gets - examination S
1CPU used by this session S 20CPU used when call started S 20db
block changes S 4,421dirty buffers inspected S 292enqueue releases
S 2enqueue requests S 4free buffer inspected S 296free buffer
requested S 446hot buffers moved to head of LRU S 219index scans
kdiixs1 S 5messages sent S 2no work - consistent read gets S
7opened cursors cumulative S 5parse time cpu S 2parse time elapsed
S 2pinned buffers inspected S 3redo entries S 2,189session pga
memory max S 131,072shared hash latch upgrades - no wait S 6SQL*Net
roundtrips to/from client S 5table scans (short tables) S 1
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 55 / 72
March 04, 2005 case study.txt
user calls S 8workarea executions - optimal S 5write clones
created in foreground S 1buffer pool L 0cache buffers chains L
14,833cache buffers lru chain L 972enqueue hash chains L 10enqueues
L 4library cache L 173library cache pin L 82redo allocation L
2,215redo copy L 2,207row cache enqueue latch L 100row cache
objects L 104shared pool L 152execute count S 5parse count (hard) S
2parse count (total) S 5redo size S 638,912table fetch by rowid S
0table scan blocks gotten S 1table scan rows gotten S 1buffer is
pinned count S 2consistent gets S 16db block gets S 2,839physical
reads S 411physical writes S 0session logical reads S 2,855sorts
(disk) S 0sorts (memory) S 3sorts (rows) S 6,405elapsed time
(centiseconds) S 141
Actual Plan for Scenario UPDATE:ANSWER2_HISTSTAT #1 id=1 cnt=0
pid=0 pos=1 obj=0 op='UPDATE (cr=15 r=411 w=0 time=1185803 us)'STAT
#1 id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=15 r=2 w=0
time=30175 us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=0 op='VIEW (cr=4
r=1 w=0 time=13335 us)'STAT #1 id=4 cnt=4 pid=3 pos=1 obj=0
op='MINUS (cr=4 r=1 w=0 time=13318 us)'STAT #1 id=5 cnt=5 pid=4
pos=1 obj=0 op='SORT UNIQUE (cr=1 r=1 w=0 time=13199 us)'STAT #1
id=6 cnt=5 pid=5 pos=1 obj=29236 op='INDEX FULL SCAN
SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=13100 us)'STAT #1 id=7 cnt=1
pid=4 pos=2 obj=222 op='TABLE ACCESS FULL DUAL (cr=3 r=0 w=0
time=76 us)'
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 56 / 72
March 04, 2005 case study.txt
STAT #1 id=8 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX RANGE SCAN
T_N3 (cr=11 r=1 w=0 time=11444 us)'SQL>SQL>SQL>SQL> get
test_ans3
1 update t2 set flag='B'3 where status=24* and flag in (select
flag from flags where flag != 'B')
SQL>SQL> @dodmlEnter .sql file name (without extension):
test_ans3Enter the workspace name: updateEnter the scenario name:
answer3_histDisplay results of SQL (ON/OFF)?: offCapturing
statistics
information...=================================================================Name
of 10046 trace file:
hotsos_ora_3228.trc=================================================================Explain
Plan for Scenario update:answer3_hist
---------------------------------------------------------------------------|
Id | Operation | Name | Rows | Bytes | Cost
|---------------------------------------------------------------------------|
0 | UPDATE STATEMENT | | 80000 | 312K| 2 || 1 | UPDATE | T | | | ||
2 | NESTED LOOPS | | 80000 | 312K| 2 ||* 3 | INDEX FULL SCAN |
SYS_IOT_TOP_29235 | 4 | 4 | 1 ||* 4 | INDEX RANGE SCAN | T_N3 |
20000 | 60000 |
|---------------------------------------------------------------------------Predicate
Information (identified by operation
id):---------------------------------------------------
3 - filter("FLAGS"."FLAG"'B')4 - access("T"."STATUS"=2 AND
"T"."FLAG"="FLAGS"."FLAG")
Note: cpu costing is
off=================================================================Name
of 10053 trace file:
hotsos_ora_2200.trc=================================================================
Actual Plan for Scenario update:answer3_hist
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 57 / 72
March 04, 2005 case study.txt
STAT #1 id=1 cnt=0 pid=0 pos=1 obj=0 op='UPDATE (cr=12 r=174 w=0
time=565098 us)'STAT #1 id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED
LOOPS (cr=12 r=2 w=0 time=25717 us)'STAT #1 id=3 cnt=4 pid=2 pos=1
obj=29236 op='INDEX FULL SCAN SYS_IOT_TOP_29235 (cr=1 r=1 w=0
time=9258 us)'STAT #1 id=4 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX
RANGE SCAN T_N3 (cr=11 r=1 w=0 time=11507 us)'SQL>SQL>SQL>
@lsscstatList of values
(Workspace)------------------------------------------------------------UPDATEWorkspace
[UPDATE]:
List of values
(Scenario)------------------------------------------------------------ANSWER1ANSWER1_HISTANSWER2ANSWER2_HISTANSWER3ANSWER3_HISTPROBLEMScenario
[ANSWER2_HIST]: answer3_hist
Statistic NameStatistic Type (S=stat, L=Latch)
Value---------------------------------------- -
--------------active checkpoint queue latch L 2checkpoint queue
latch L 694child cursor hash table L 15Consistent RBA L 4dml lock
allocation L 3hash table column usage latch L 15lgwr LWN SCN L
4library cache pin allocation L 40list of block allocation L
8messages L 19mostly latch-free SCN L 4redo writing L 14session
idle bit L 16simulator hash latch L 177simulator lru latch L 24SQL
memory manager workarea list latch L 4
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 58 / 72
March 04, 2005 case study.txt
transaction allocation L 2undo global data L 17buffer is not
pinned count S 1bytes received via SQL*Net from client S 1,181bytes
sent via SQL*Net to client S 709calls to get snapshot scn: kcmgss S
3change write time S 1consistent gets - examination S 1CPU used by
this session S 14CPU used when call started S 14db block changes S
4,421dirty buffers inspected S 212enqueue releases S 2enqueue
requests S 4free buffer inspected S 216free buffer requested S
208hot buffers moved to head of LRU S 441index scans kdiixs1 S
5messages sent S 2no work - consistent read gets S 6opened cursors
cumulative S 5parse time cpu S 1parse time elapsed S 2pinned
buffers inspected S 4redo entries S 2,189session pga memory max S
65,536shared hash latch upgrades - no wait S 6SQL*Net roundtrips
to/from client S 5user calls S 8workarea executions - optimal S
4buffer pool L 0cache buffers chains L 14,332cache buffers lru
chain L 636enqueue hash chains L 16enqueues L 4library cache L
151library cache pin L 76redo allocation L 2,238redo copy L
2,230row cache enqueue latch L 74row cache objects L 78shared pool
L 140execute count S 5parse count (hard) S 2parse count (total) S
5redo size S 638,912
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 59 / 72
March 04, 2005 case study.txt
table fetch by rowid S 0table scan blocks gotten S 0table scan
rows gotten S 0buffer is pinned count S 2consistent gets S 12db
block gets S 2,839physical reads S 174physical writes S 0session
logical reads S 2,851sorts (disk) S 0sorts (memory) S 2sorts (rows)
S 6,400elapsed time (centiseconds) S 68
Actual Plan for Scenario UPDATE:ANSWER3_HISTSTAT #1 id=1 cnt=0
pid=0 pos=1 obj=0 op='UPDATE (cr=12 r=174 w=0 time=565098 us)'STAT
#1 id=2 cnt=1600 pid=1 pos=1 obj=0 op='NESTED LOOPS (cr=12 r=2 w=0
time=25717 us)'STAT #1 id=3 cnt=4 pid=2 pos=1 obj=29236 op='INDEX
FULL SCAN SYS_IOT_TOP_29235 (cr=1 r=1 w=0 time=9258 us)'STAT #1
id=4 cnt=1600 pid=2 pos=2 obj=29241 op='INDEX RANGE SCAN T_N3
(cr=11 r=1 w=0 time=11507 us)'SQL>SQL>SQL>SQL> @hrank
updateScenario ranking for workspace update by elapsed time
Elapsed Time (secs) Scenario Name---------------------
--------------------------------------------------------------------------------
0.680000 ANSWER3_HIST1.020000 ANSWER31.410000
ANSWER2_HIST1.510000 ANSWER21.690000 ANSWER1_HIST2.340000
ANSWER16.210000 PROBLEM
SQL>SQL>SQL> @diffList of values (First
workspace)------------------------------------------------------------
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 60 / 72
March 04, 2005 case study.txt
UPDATEFirst workspace [UPDATE]:
List of values (First
scenario)------------------------------------------------------------ANSWER1ANSWER1_HISTANSWER2ANSWER2_HISTANSWER3ANSWER3_HISTPROBLEMFirst
scenario [ANSWER2]: answer1
List of values (Second
workspace)------------------------------------------------------------UPDATESecond
workspace [UPDATE]:
List of values (Second
scenario)------------------------------------------------------------ANSWER1ANSWER1_HISTANSWER2ANSWER2_HISTANSWER3ANSWER3_HISTPROBLEMSecond
scenario [ANSWER3]: answer1_hist
Statistic Name UPDATE UPDATEStatistic Type (S=stat, L=Latch)
ANSWER1 ANSWER1_HIST
Difference---------------------------------------- - --------------
-------------- --------------checkpoint queue latch L 2,357 2,101
-256Consistent RBA L 5 7 2lgwr LWN SCN L 5 7 2list of block
allocation L 6 5 -1messages L 31 39 8mostly latch-free SCN L 5 7
2multiblock read objects L 48 2 -46
-
Hotsos Symposium 2005 - The Basics of an Effective Test
Environment 61 / 72
March 04, 2005 case study.txt
redo writing L 21 28 7session timer L 0 1 1sim partition latch L
2 1 -1simulator hash latch L 464 356 -108simulator l