Hash join ending up in huge wait events
Hi,
We are experiencing huge wait events ( direct path read temp , direct path write temp) on our Materialized View refresh in 10.2.0.4 version of oracle 10g in linux rhel5 environment while monitoring the refresh session from db console. While checking the explain plan of the mv query there is a huge hash_join (due to self join nature of the query) is shown. As advised in some dba forums, i have increased my pga_aggregate_target to a value of 4 gb from 1800 mb. The PGA_HIT % is raised to 60% from 58% ( just 2% improvement). But still my direct path read temp and direct path write temp wait event have not reduced and a huge temp space is taken for hash join.
Since we have some usage limit set by some hidden parameters for a each session on pga_aggregate_target, increase the size did not helped me much. The mv refresh is taking more than 5 hours ( sometimes it exceeds 5 hrs) to completes it refresh where as the same query in window (production) is completed less than two hours. Before a month, the refresh time in both environment was nearly close. But now it has changed and not able to figure it out.
STATISTICS have been collected regularly using dbms_gather_stats in both environment. Both mv refresh are scheduled to run using dbms_scheduler (Manual refresh). SGA_TARGET and other memory parameters are almost same.
Environment : Dataware house
O/s : RHEL 5
Oracle version : 10.2.0.4
Work_policy=auto
Is there any possibility to reduce this wait event and there by reducing the elapsed time? I am also interested to know changing the plan to use other sort will help? I don't know whether the details are sufficient to analyze this issue. If you need more details on this just let me know.
I really appreciate your help and thanks in advance to all.
Thans for your comments. Here is the code, explan plan and autotrace trace stat output.
SELECT lasg.employee_number "EMPLOYEE_NUM",
lasg.full_name "FULL_NAME",
lasg.person_id "PERSON_ID",
SUBSTR (lasg.organization, 1, 4) "DEPT",
casg.assign_start_date "EFFECTIVE_START_DATE",
casg.assign_end_date "EFFECTIVE_END_DATE",
hasg.organization "PRIOR_ORG",
casg.organization organization,
hasg.supervisor "PRIOR_SUPERVISOR",
casg.supervisor "SUPERVISOR_NAME",
hasg.location "PRIOR_LOCATION",
casg.location location,
hasg.job_title "PRIOR_TITLE",
casg.job_title job_name,
CASE
WHEN hasg.organization = casg.organization THEN 'No Change'
ELSE 'Change'
END
org_change,
CASE
WHEN hasg.location = casg.location THEN 'No Change'
ELSE 'Change'
END
loc_change,
CASE
WHEN hasg.supervisor = casg.supervisor THEN 'No Change'
ELSE 'Change'
END
sup_change,
CASE
WHEN hasg.job_title = casg.job_title THEN 'No Change'
ELSE 'Change'
END
job_change
FROM panad.data_employ_details lasg,
panad.data_employ_details casg,
panad.data_employ_details hasg
WHERE lasg.person_id = casg.person_id(+)
AND lasg.assign_end_date = (SELECT MAX (lasg2.assign_end_date)
FROM panad.data_employ_details lasg2
WHERE lasg.person_id = lasg2.person_id)
AND casg.person_id = hasg.person_id(+)
AND hasg.assign_start_date =
(SELECT MAX (hasg2.assign_start_date)
FROM panad.data_employ_details hasg2
WHERE hasg2.person_id = lasg.person_id
AND hasg2.assign_end_date < casg.assign_start_date)
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 303 | | 10261 (91)| 00:02:04 |
|* 1 | FILTER | | | | | | |
|* 2 | HASH JOIN | | 1 | 303 | | 10179 (91)| 00:02:03 |
|* 3 | HASH JOIN | | 5 | 1060 | | 10095 (92)| 00:02:02 |
|* 4 | HASH JOIN | | 6786 | 960K| | 10011 (93)| 00:02:01 |
| 5 | VIEW | VW_SQ_1 | 6786 | 225K| | 9927 (94)| 00:02:00 |
| 6 | HASH GROUP BY | | 6786 | 384K| | 9927 (94)| 00:02:00 |
| 7 | MERGE JOIN | | 50M| 2820M| | 1427 (53)| 00:00:18 |
| 8 | SORT JOIN | | 31937 | 998K| 2776K| 367 (2)| 00:00:05 |
| 9 | TABLE ACCESS FULL| DATA_EMPLOY_DETAILS | 31937 | 998K| | 82 (2)| 00:00:01 |
|* 10 | SORT JOIN | | 31937 | 810K| 2520K| 324 (2)| 00:00:04 |
| 11 | TABLE ACCESS FULL| DATA_EMPLOY_DETAILS | 31937 | 810K| | 82 (2)| 00:00:01 |
| 12 | TABLE ACCESS FULL | DATA_EMPLOY_DETAILS | 31937 | 3461K| | 83 (3)| 00:00:01 |
| 13 | TABLE ACCESS FULL | DATA_EMPLOY_DETAILS | 31937 | 2089K| | 83 (3)| 00:00:01 |
| 14 | TABLE ACCESS FULL | DATA_EMPLOY_DETAILS | 31937 | 2838K| | 83 (3)| 00:00:01 |
| 15 | SORT AGGREGATE | | 1 | 13 | | | |
|* 16 | TABLE ACCESS FULL | DATA_EMPLOY_DETAILS | 5 | 65 | | 82 (2)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("LASG"."ASSIGN_END_DATE"= (SELECT MAX("LASG2"."ASSIGN_END_DATE") FROM
"PANAD"."DATA_EMPLOY_DETAILS" "LASG2" WHERE "LASG2"."PERSON_ID"=:B1))
2 - access("CASG"."PERSON_ID"="HASG"."PERSON_ID" AND "HASG"."ASSIGN_START_DATE"="VW_COL_1")
3 - access("LASG"."PERSON_ID"="CASG"."PERSON_ID" AND "PERSON_ID"="LASG"."PERSON_ID")
4 - access("ROWID"=ROWID)
10 - access(INTERNAL_FUNCTION("HASG2"."ASSIGN_END_DATE")<INTERNAL_FUNCTION("CASG"."ASSIGN_START_DATE")
filter(INTERNAL_FUNCTION("HASG2"."ASSIGN_END_DATE")<INTERNAL_FUNCTION("CASG"."ASSIGN_START_DATE")
16 - filter("LASG2"."PERSON_ID"=:B1)
37 rows selected.
- autot trace stat output -
5070 rows selected.
Statistics
35203 recursive calls
0 db block gets
3675913 consistent gets
4269882 physical reads
0 redo size
1046781 bytes sent via SQL*Net to client
4107 bytes received via SQL*Net from client
339 SQL*Net roundtrips to/from client
69 sorts (memory)
0 sorts (disk)
5070 rows processed I have tried running this query with paralell but not helped.
I have read the links provided by both of you. Dictionary and fixed table stats are collected as a routine.
From the link given byTaral, Greg Rahn has suggested that it is a bug as below.
Its bug 9041800 and there is a 10.2.0.4 backport available as of 01/29/10.How can i get this bug fixed since there is no explanation of what need to be done? Do i need to contact oracle support for the 10.2.0.4 backport for RHEL5?
Thanks in advance
Edited by: Karthikambalav on Mar 9, 2010 2:43 AM
Similar Messages
-
Hi
I would like to know if there is difference between bind join end hash join.
For example If I write sql code in My query tool (in Data Federator Query server administrator XI 3.0) it is traduced in a hashjoin(....);If I set system parameters in right way to produce bind join, hashjoin(...) is present again!
how do i understand the difference?
byeHi,
this is the WebIntelligence forum, but the tool you are describing is Data Federator (Enterprise Information Management)
You will have more luck over here: Data Services and Data Quality
Regards,
H -
End of file on communication channel when doing a (hash) join
I'm having a problem with a simple join between two tables (hash join, from the explain), one containing about 650k rows, the other 730k.
The query runs fine until I add to the select list a geometry field (oracle spatial). In that case I receive an end-of-file error, which seems to be caused by a memory saturation. I'm not sure about this, as I can't understand the trace very well...
I've increased the pga_aggregate_target and the pgamax_size but this have little effects on the problem...
Any hint? Could it be caused by the geometry field size?
thanks,
giovanniThanks for the quick reply. Here it is what you asked:
select from v$version;*
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
"CORE 10.2.0.4.0 Production"
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
an excerpt from the trace file:
*** ACTION NAME:() 2010-04-16 12:48:17.796
*** MODULE NAME:(SQL*Plus) 2010-04-16 12:48:17.796
*** SERVICE NAME:(ABRUZZO) 2010-04-16 12:48:17.796
*** SESSION ID:(149.10) 2010-04-16 12:48:17.796
*** 2010-04-16 12:48:17.796
ksedmp: internal or fatal error
ORA-07445: trovata eccezione: dump della memoria [ACCESS_VIOLATION] [_kokekd2m+24] [PC:0x11CF9E0] [ADDR:0xBA8C193C] [UNABLE_TO_READ] []
Current SQL statement for this session:
select g.cr375_idobj,g.cr375_geometria,t.cr374_codicectr,t.cr374_scarpt_cont
from DBTI.Cr374_Scarpata t, DBTI.Cr375g_a_Scarp g
where t.cr374_idobj=g.cr375_idobj
check trace file c:\oracle\product\10.2.0\db_1\rdbms\trace\abruzzo_ora_0.trc for preloading .sym file messages
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
_kokekd2m+24 00000000
kokeq2iro+178 CALLrel kokekd2m+0 99384C8 9937624 BA8C18D8
9968588 3660D954 3A52AC00
__VInfreq__rworupo+ CALLrel _kokeq2iro+0 9968218 A05C810 EA7
321
_kxhrUnpack+71 CALLreg 00000000 99693C8 A05C810 0 9 0
qerhjWalkHashBucke CALLrel kxhrUnpack+0 9967DD0 99693C8 9 A05C810 0
t+210
__PGOSF352__qerhjIn CALLrel _qerhjWalkHashBucke A05CED4 99693C0 8
nerProbeHashTable+4 t+0
78
_kdstf0000101km+230 CALLreg 00000000
kdsttgr+1263 CALLrel kdstf0000101km+0 -
Parallel Hash Join always swapping to TEMP
Hi,
I've experienced some strange behaviour on Oracle 9.2.0.5 recently: simple query hash joining two tables - smaller with 16k records/1 mb of size and bigger with 2.5m records/1.5 gb of size is swapping to TEMP when launched in parallel mode (4 set of PQ slaves). What is strange serial execution is running as expected - in-memory Hash Join occurs. It's worth to add that both parallel and serial execution properly selects smaller table as inner one but parallel query always decides to buffer the source data (no matter how big is it).
To be more precise - all table stats are gathered, I have enough PGA memory assigned to queries (WORKAREA_POLICY_SIZE=AUTO, PGA_AGGREGATE_TARGET=6GB) and I properly analyze the results. Even hidden parameter SMMPX_MAX_SIZE is properly set to about 2GB, the issue is that parallel execution still decides to swap (even if the inner data size for each slave is about 220kb!).
I dig into the traces (10104 event) and found some substantial difference between serial and parallel execution. It looks like some internal flag orders PQ slaves to always buffer the data, here is what I found in PQ slave trace:
HASH JOIN STATISTICS (INITIALIZATION)
Original memory: 4428800
Memory after all overhead: 4283220
Memory for slots: 3809280
Calculated overhead for partitions and row/slot managers: 473940
Hash-join fanout: 8
Number of partitions: 9
Number of slots: 15
Multiblock IO: 31
Block size(KB): 8
Cluster (slot) size(KB): 248
Hash-join fanout (manual): 8
Cluster/slot size(KB) (manual): 280
Minimum number of bytes per block: 8160
Bit vector memory allocation(KB): 128
Per partition bit vector length(KB): 16
Maximum possible row length: 1455
Estimated build size (KB): 645
Estimated Row Length (includes overhead): 167
Immutable Flags:
BUFFER the output of the join for Parallel Query
kxhfSetPhase: phase=BUILD
kxhfAddChunk: add chunk 0 (sz=32) to slot table
kxhfAddChunk: chunk 0 (lbs=800003ff640ebb50, slotTab=800003ff640ebce8) successfuly added
kxhfSetPhase: phase=PROBE_1
Bolded is the part that is not present in serial mode. Unfortunatelly I cannot find anything that could help identifying the reason or setting that drives this behaviour :(
Best regards
Bazyli
Edited by: user10419027 on Oct 13, 2008 3:53 AMJonathan,
Distribution seems to be as expected (HASH/HASH), please have a look on the query plan:
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost | TQ |IN-OUT| PQ Distrib |
| 0 | SELECT STATEMENT | | 456K| 95M| 876 | | | |
|* 1 | HASH JOIN | | 456K| 95M| 876 | 43,02 | P->S | QC (RAND) |
| 2 | TABLE ACCESS FULL | SH30_8700195_9032_0_TMP_TEST | 16555 | 468K| 16 | 43,00 | P->P | HASH |
| 3 | TABLE ACCESS FULL | SH30_8700195_9031_0_TMP_TEST | 2778K| 503M| 860 | 43,01 | P->P | HASH |
Predicate Information (identified by operation id):
1 - access(NVL("A"."PROD_ID",'NULL!')=NVL("B"."PROD_ID",'NULL!') AND
NVL("A"."PROD_UNIT_OF_MEASR_ID",'NULL!')=NVL("B"."PROD_UNIT_OF_MEASR_ID",'NULL!'))Let me also share with you trace files from parallel and serial execution.
First, serial execution (only 10104 event details):
Dump file /opt/oracle/admin/cdwep4/udump/cdwep401_ora_18729.trc
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
ORACLE_HOME = /opt/oracle/product/9.2.0.5
System name: HP-UX
Node name: ethp1018
Release: B.11.11
Version: U
Machine: 9000/800
Instance name: cdwep401
Redo thread mounted by this instance: 1
Oracle process number: 100
Unix process pid: 18729, image: oracle@ethp1018 (TNS V1-V3)
kxhfInit(): enter
kxhfInit(): exit
*** HASH JOIN STATISTICS (INITIALIZATION) ***
Original memory: 4341760
Memory after all overhead: 4163446
Memory for slots: 3301376
Calculated overhead for partitions and row/slot managers: 862070
Hash-join fanout: 8
Number of partitions: 8
Number of slots: 13
Multiblock IO: 31
Block size(KB): 8
Cluster (slot) size(KB): 248
Hash-join fanout (manual): 8
Cluster/slot size(KB) (manual): 240
Minimum number of bytes per block: 8160
Bit vector memory allocation(KB): 128
Per partition bit vector length(KB): 16
Maximum possible row length: 1455
Estimated build size (KB): 1083
Estimated Row Length (includes overhead): 67
# Immutable Flags:
kxhfSetPhase: phase=BUILD
kxhfAddChunk: add chunk 0 (sz=32) to slot table
kxhfAddChunk: chunk 0 (lbs=800003ff6c063b20, slotTab=800003ff6c063cb8) successfuly added
kxhfSetPhase: phase=PROBE_1
qerhjFetch: max build row length (mbl=110)
*** END OF HASH JOIN BUILD (PHASE 1) ***
Revised row length: 68
Revised row count: 16555
Revised build size: 1089KB
kxhfResize(enter): resize to 12 slots (numAlloc=8, max=13)
kxhfResize(exit): resized to 12 slots (numAlloc=8, max=12)
Slot table resized: old=13 wanted=12 got=12 unload=0
*** HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Total number of partitions: 8
Number of partitions which could fit in memory: 8
Number of partitions left in memory: 8
Total number of slots in in-memory partitions: 8
Total number of rows in in-memory partitions: 16555
(used as preliminary number of buckets in hash table)
Estimated max # of build rows that can fit in avail memory: 55800
### Partition Distribution ###
Partition:0 rows:2131 clusters:1 slots:1 kept=1
Partition:1 rows:1975 clusters:1 slots:1 kept=1
Partition:2 rows:1969 clusters:1 slots:1 kept=1
Partition:3 rows:2174 clusters:1 slots:1 kept=1
Partition:4 rows:2041 clusters:1 slots:1 kept=1
Partition:5 rows:2092 clusters:1 slots:1 kept=1
Partition:6 rows:2048 clusters:1 slots:1 kept=1
Partition:7 rows:2125 clusters:1 slots:1 kept=1
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Revised number of hash buckets (after flushing): 16555
Allocating new hash table.
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Requested size of hash table: 4096
Actual size of hash table: 4096
Number of buckets: 32768
kxhfResize(enter): resize to 14 slots (numAlloc=8, max=12)
kxhfResize(exit): resized to 14 slots (numAlloc=8, max=14)
freeze work area size to: 4357K (14 slots)
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Total number of rows (may have changed): 16555
Number of in-memory partitions (may have changed): 8
Final number of hash buckets: 32768
Size (in bytes) of hash table: 262144
kxhfIterate(end_iterate): numAlloc=8, maxSlots=14
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
### Hash table ###
# NOTE: The calculated number of rows in non-empty buckets may be smaller
# than the true number.
Number of buckets with 0 rows: 21129
Number of buckets with 1 rows: 8755
Number of buckets with 2 rows: 2024
Number of buckets with 3 rows: 433
Number of buckets with 4 rows: 160
Number of buckets with 5 rows: 85
Number of buckets with 6 rows: 69
Number of buckets with 7 rows: 41
Number of buckets with 8 rows: 32
Number of buckets with 9 rows: 18
Number of buckets with between 10 and 19 rows: 21
Number of buckets with between 20 and 29 rows: 1
Number of buckets with between 30 and 39 rows: 0
Number of buckets with between 40 and 49 rows: 0
Number of buckets with between 50 and 59 rows: 0
Number of buckets with between 60 and 69 rows: 0
Number of buckets with between 70 and 79 rows: 0
Number of buckets with between 80 and 89 rows: 0
Number of buckets with between 90 and 99 rows: 0
Number of buckets with 100 or more rows: 0
### Hash table overall statistics ###
Total buckets: 32768 Empty buckets: 21129 Non-empty buckets: 11639
Total number of rows: 16555
Maximum number of rows in a bucket: 24
Average number of rows in non-empty buckets: 1.422373
=====================
.... (lots of fetching) ....
qerhjFetch: max probe row length (mpl=0)
qerhjFreeSpace(): free hash-join memory
kxhfRemoveChunk: remove chunk 0 from slot tableAnd finally, PQ slave output (only one trace, please note Immutable Flag that I believe orders Oracle to buffer to TEMP):
Dump file /opt/oracle/admin/cdwep4/bdump/cdwep401_p002_4640.trc
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
ORACLE_HOME = /opt/oracle/product/9.2.0.5
System name: HP-UX
Node name: ethp1018
Release: B.11.11
Version: U
Machine: 9000/800
Instance name: cdwep401
Redo thread mounted by this instance: 1
Oracle process number: 86
Unix process pid: 4640, image: oracle@ethp1018 (P002)
kxhfInit(): enter
kxhfInit(): exit
*** HASH JOIN STATISTICS (INITIALIZATION) ***
Original memory: 4428800
Memory after all overhead: 4283220
Memory for slots: 3809280
Calculated overhead for partitions and row/slot managers: 473940
Hash-join fanout: 8
Number of partitions: 9
Number of slots: 15
Multiblock IO: 31
Block size(KB): 8
Cluster (slot) size(KB): 248
Hash-join fanout (manual): 8
Cluster/slot size(KB) (manual): 280
Minimum number of bytes per block: 8160
Bit vector memory allocation(KB): 128
Per partition bit vector length(KB): 16
Maximum possible row length: 1455
Estimated build size (KB): 645
Estimated Row Length (includes overhead): 167
# Immutable Flags:
BUFFER the output of the join for Parallel Query
kxhfSetPhase: phase=BUILD
kxhfAddChunk: add chunk 0 (sz=32) to slot table
kxhfAddChunk: chunk 0 (lbs=800003ff640ebb50, slotTab=800003ff640ebce8) successfuly added
kxhfSetPhase: phase=PROBE_1
qerhjFetch: max build row length (mbl=96)
*** END OF HASH JOIN BUILD (PHASE 1) ***
Revised row length: 54
Revised row count: 4203
Revised build size: 221KB
kxhfResize(enter): resize to 16 slots (numAlloc=8, max=15)
kxhfResize(exit): resized to 16 slots (numAlloc=8, max=16)
Slot table resized: old=15 wanted=16 got=16 unload=0
*** HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Total number of partitions: 8
Number of partitions which could fit in memory: 8
Number of partitions left in memory: 8
Total number of slots in in-memory partitions: 8
Total number of rows in in-memory partitions: 4203
(used as preliminary number of buckets in hash table)
Estimated max # of build rows that can fit in avail memory: 85312
### Partition Distribution ###
Partition:0 rows:537 clusters:1 slots:1 kept=1
Partition:1 rows:554 clusters:1 slots:1 kept=1
Partition:2 rows:497 clusters:1 slots:1 kept=1
Partition:3 rows:513 clusters:1 slots:1 kept=1
Partition:4 rows:498 clusters:1 slots:1 kept=1
Partition:5 rows:543 clusters:1 slots:1 kept=1
Partition:6 rows:547 clusters:1 slots:1 kept=1
Partition:7 rows:514 clusters:1 slots:1 kept=1
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Revised number of hash buckets (after flushing): 4203
Allocating new hash table.
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Requested size of hash table: 1024
Actual size of hash table: 1024
Number of buckets: 8192
kxhfResize(enter): resize to 18 slots (numAlloc=8, max=16)
kxhfResize(exit): resized to 18 slots (numAlloc=8, max=18)
freeze work area size to: 5812K (18 slots)
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
Total number of rows (may have changed): 4203
Number of in-memory partitions (may have changed): 8
Final number of hash buckets: 8192
Size (in bytes) of hash table: 65536
kxhfIterate(end_iterate): numAlloc=8, maxSlots=18
*** (continued) HASH JOIN BUILD HASH TABLE (PHASE 1) ***
### Hash table ###
# NOTE: The calculated number of rows in non-empty buckets may be smaller
# than the true number.
Number of buckets with 0 rows: 5284
Number of buckets with 1 rows: 2177
Number of buckets with 2 rows: 510
Number of buckets with 3 rows: 104
Number of buckets with 4 rows: 51
Number of buckets with 5 rows: 14
Number of buckets with 6 rows: 14
Number of buckets with 7 rows: 13
Number of buckets with 8 rows: 12
Number of buckets with 9 rows: 4
Number of buckets with between 10 and 19 rows: 9
Number of buckets with between 20 and 29 rows: 0
Number of buckets with between 30 and 39 rows: 0
Number of buckets with between 40 and 49 rows: 0
Number of buckets with between 50 and 59 rows: 0
Number of buckets with between 60 and 69 rows: 0
Number of buckets with between 70 and 79 rows: 0
Number of buckets with between 80 and 89 rows: 0
Number of buckets with between 90 and 99 rows: 0
Number of buckets with 100 or more rows: 0
### Hash table overall statistics ###
Total buckets: 8192 Empty buckets: 5284 Non-empty buckets: 2908
Total number of rows: 4203
Maximum number of rows in a bucket: 16
Average number of rows in non-empty buckets: 1.445323
kxhfWrite: hash-join is spilling to disk
kxhfWrite: Writing dba=950281 slot=8 part=8
kxhfWrite: Writing dba=950312 slot=9 part=8
kxhfWrite: Writing dba=950343 slot=10 part=8
kxhfWrite: Writing dba=950374 slot=11 part=8
.... (lots of writing) ....
kxhfRead(): Reading dba=950281 into slot=15
kxhfIsDone: waiting slot=15 lbs=800003ff640ebb50
kxhfRead(): Reading dba=950312 into slot=16
kxhfIsDone: waiting slot=16 lbs=800003ff640ebb50
kxhfRead(): Reading dba=950343 into slot=17
kxhfFreeSlots(800003ff7c068918): all=0 alloc=18 max=18
EmptySlots:15 8 9 10 11 12 13
PendingSlots:
kxhfIsDone: waiting slot=17 lbs=800003ff640ebb50
kxhfRead(): Reading dba=950374 into slot=15
kxhfFreeSlots(800003ff7c068918): all=0 alloc=18 max=18
EmptySlots:16 8 9 10 11 12 13
PendingSlots:
.... (lots of reading) ....
qerhjFetchPhase2(): building a hash table
kxhfFreeSlots(800003ff7c068980): all=1 alloc=18 max=18
EmptySlots:2 4 6 1 0 7 5 3 14 17 16 15 8 9 10 11 12 13
PendingSlots:
qerhjFreeSpace(): free hash-join memory
kxhfRemoveChunk: remove chunk 0 from slot tableWhy do you think it's surprising that Oracle utilizes TEMP? Basing on traces Oracle seems to be very sure it should spill to disk. I believe the key to answer is this immutable flag printing "BUFFER the output of the join for Parallel Query" - as I mentioned in one of previous posts it's opposite to "Not BUFFER(execution) output of the join for PQ" which appears in some traces found on internet.
Best regards
Bazyli -
Tuning row lock contention wait events
Hello everyone,
Working on 10g/windows
Top 5 events
EVENT TOTAL_WAITS TIME_WAITED AVG_MS PERCENT
CPU 9462339 48
enq: TX - row lock contention 12531 3660728 2921.34 18
control file parallel write 1300731 3088079 23.74 16
log file parallel write 1510503 1264080 8.37 6
log file sync 1072553 968007 9.03 5
Distribution of row lock wait during the last 4 days in the database server
END_INTERVAL_TIME TOTAL_WAITS TIME_WAITED_MICRO AVG_WAIT_MS
2008-04-01 16:00:58 909 2721008230 2993.41
2008-04-01 15:00:27 50 149941140 2998.82
2008-03-31 12:00:42 193 575595397 2982.36
2008-03-29 23:00:13 172 513058700 2982.9
2008-03-29 22:00:37 164 483940046 2950.85
2008-03-27 22:00:35 565 1667120838 2950.66
2008-03-26 18:00:59 348 1042918982 2996.89
My analysis:
It's obvious that the row lock contention wait time is huge, and this direct me to find out SQL stmt, causing this.
all the SQL statement was SELECT ....... FOR UPDATE stmt.
I was also able to find out locked tables.
My tuning idea:
1. I'm thinking to reorganize hot tables as well as their indexes, but by instinct it seems to not give so much value to avoid the huge row lock wait time.
2. I'm also seeing if I can reduce the number of rows per block, by increasing PCTFREE and diminishing PCTUSED, so the contention will spread over many blocks instead of one heavy block.
Question
As SQL stmt related to those locked tables are select ... for update, how could I tune this kind of stmt?
Does someone have other idea to come up with this row lock contention?
Tanks for your effort and helpTaking another look at your suggested function based index, it depends on the data type of the DEV.POS_FOLIO_ID.POS_FOLIO_ID column. If the column is defined as a number, and it is a primary key, there will already be a usable index on that column.
Yesterday, I wrote this: "Once I understood why or how the sessions were trying to insert duplicate primary key values, I would try to determine why the average number of seconds for the wait event is almost 3 seconds (maybe a timeout)."
After fixing the formatting of the top 5 wait events (total duration unknown):
EVENT TOTAL_WAITS TIME_WAITED AVG_MS PERCENT
CPU 94,623.39 48
enq: TX - row lock contention 12,531 36,607.28 2921.34 18
control file parallel write 1,300,731 30,880.79 23.74 16
log file parallel write 1,510,503 12,640.80 8.37 6
log file sync 1,072,553 9,680.07 9.03 512,531 * 3 second time out = 37,593 seconds = 10.44 hours.
What if the reason for the 3 second average wait time is due to a timeout. I performed a little experiment... I changed a row in a test table and then made a pot of coffee.
In session 1:
CREATE TABLE T1 (
C1 NUMBER(10),
C2 NUMBER(10),
PRIMARY KEY (C1));
INSERT INTO T1
SELECT
ROWNUM,
ROWNUM*10
FROM
DUAL
CONNECT BY
LEVEL<=1000000;
COMMIT;I now have a test table with 1,000,000 rows. I start monitoring the changes in the wait events roughly every 60 seconds, and V$SESSION_WAIT and V$LOCK roughly 4 times per second.
Back in session 1:
UPDATE
T1
SET
C1=-C1
WHERE
C1<=100;I have now modified the first 100 rows that were inserted into the table, time to make the pot of coffee.
In session 2, I try to insert a row with a primary key value of -10:
INSERT INTO T1 VALUES (
-10,
10);Session 2 hangs.
If I take the third 60 second snap of the system wide wait events as the zero point, and the 11th snap as the end point. There were 149 waits on ENQ: TX - ROW LOCK CONTENTION, 148 time outs, 446.62 seconds of total time in the wait event, with an average wait time of 2.997450 seconds.
Rolling down to the session level wait events, SID 208 (my session 2) had 149 waits on ENQ: TX - ROW LOCK CONTENTION, for a total time of 446.61 seconds with an average wait time of 2.997383 seconds. All of the 149 waits and the wait time was in this one session that was locked up for the full duration of this time period because session 1 was making a pot of coffee.
Rolling down to V$SESSION_WAIT (sampled roughly 4 times per second): At the start of the third time interval, SID 208 has been in the ENQ: TX - ROW LOCK CONTENTION wait event for 39 seconds and is actively waiting trying to execute SQL with a hash value of 1001532423, the wait object is -1, wait file is 0, wait block is 0, wait row is 0, P1 is 1415053316, P2 is 196646, P3 is 4754.
At the end of the 11th time interval: , SID 208 has been in the ENQ: TX - ROW LOCK CONTENTION wait event for 483 seconds and is actively waiting trying to execute SQL with a hash value of 1001532423, the wait object is -1, wait file is 0, wait block is 0, wait row is 0, P1 is 1415053316, P2 is 196646, P3 is 4754.
Rolling down to V$LOCK (sampled roughly 4 times per second): I see that SID 214 (session 1) is blocking SID 208 (session 2). SID 214 has a TX lock in mode 6 with ID1 of 196646 and ID2 of 4754. SID 208 is requesting a TX lock in mode 4 with ID1 of 196646 and ID2 of 4754.
So, it seems that I need a faster coffee pot rather than an additional index on my table. It could be that the above process would have found that the application associated with SID 214 was abandoned or crashed and for some reason the lock was not released for a long period of time, a little less than 10.44 hours in your case.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. -
Hi: I'm analyzing this STATSPACK report: it is "volume test" on our UAT server, so most input is from 'bind variables'. Our shared pool is well utilized in oracle. Oracle redo logs is not appropriately configured on this server, as in 'Top 5 wait events' there are 2 for redos.
I need to know what else information can be dig-out from 'foreground wait events' & 'background wait events', and what can assist us to better understanding, in combination of 'Top 5 wait event's, that how the server/test went? it could be overwelming No. of wait events, so appreciate any helpful diagnostic or analysis. Database is oracle 11.2.0.4 upgraded from 11.2.0.3, on IBM AIX power system 64bit, level 6.x
STATSPACK report for
Database DB Id Instance Inst Num Startup Time Release RAC
~~~~~~~~ ----------- ------------ -------- --------------- ----------- ---
700000XXX XXX 1 22-Apr-15 12:12 11.2.0.4.0 NO
Host Name Platform CPUs Cores Sockets Memory (G)
~~~~ ---------------- ---------------------- ----- ----- ------- ------------
dXXXX_XXX AIX-Based Systems (64- 2 1 0 16.0
Snapshot Snap Id Snap Time Sessions Curs/Sess Comment
~~~~~~~~ ---------- ------------------ -------- --------- ------------------
Begin Snap: 5635 22-Apr-15 13:00:02 114 4.6
End Snap: 5636 22-Apr-15 14:00:01 128 8.8
Elapsed: 59.98 (mins) Av Act Sess: 0.6
DB time: 35.98 (mins) DB CPU: 19.43 (mins)
Cache Sizes Begin End
~~~~~~~~~~~ ---------- ----------
Buffer Cache: 2,064M Std Block Size: 8K
Shared Pool: 3,072M Log Buffer: 13,632K
Load Profile Per Second Per Transaction Per Exec Per Call
~~~~~~~~~~~~ ------------------ ----------------- ----------- -----------
DB time(s): 0.6 0.0 0.00 0.00
DB CPU(s): 0.3 0.0 0.00 0.00
Redo size: 458,720.6 8,755.7
Logical reads: 12,874.2 245.7
Block changes: 1,356.4 25.9
Physical reads: 6.6 0.1
Physical writes: 61.8 1.2
User calls: 2,033.7 38.8
Parses: 286.5 5.5
Hard parses: 0.5 0.0
W/A MB processed: 1.7 0.0
Logons: 1.2 0.0
Executes: 801.1 15.3
Rollbacks: 6.1 0.1
Transactions: 52.4
Instance Efficiency Indicators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 100.00 Redo NoWait %: 100.00
Buffer Hit %: 99.98 Optimal W/A Exec %: 100.00
Library Hit %: 99.77 Soft Parse %: 99.82
Execute to Parse %: 64.24 Latch Hit %: 99.98
Parse CPU to Parse Elapsd %: 53.15 % Non-Parse CPU: 98.03
Shared Pool Statistics Begin End
Memory Usage %: 10.50 12.79
% SQL with executions>1: 69.98 78.37
% Memory for SQL w/exec>1: 70.22 81.96
Top 5 Timed Events Avg %Total
~~~~~~~~~~~~~~~~~~ wait Call
Event Waits Time (s) (ms) Time
CPU time 847 50.2
enq: TX - row lock contention 4,480 434 97 25.8
log file sync 284,169 185 1 11.0
log file parallel write 299,537 164 1 9.7
log file sequential read 698 16 24 1.0
Host CPU (CPUs: 2 Cores: 1 Sockets: 0)
~~~~~~~~ Load Average
Begin End User System Idle WIO WCPU
1.16 1.84 19.28 14.51 66.21 1.20 82.01
Instance CPU
~~~~~~~~~~~~ % Time (seconds)
Host: Total time (s): 7,193.8
Host: Busy CPU time (s): 2,430.7
% of time Host is Busy: 33.8
Instance: Total CPU time (s): 1,203.1
% of Busy CPU used for Instance: 49.5
Instance: Total Database time (s): 2,426.4
%DB time waiting for CPU (Resource Mgr): 0.0
Memory Statistics Begin End
~~~~~~~~~~~~~~~~~ ------------ ------------
Host Mem (MB): 16,384.0 16,384.0
SGA use (MB): 7,136.0 7,136.0
PGA use (MB): 282.5 361.4
% Host Mem used for SGA+PGA: 45.3 45.8
Foreground Wait Events DB/Inst: XXXXXs Snaps: 5635-5636
-> Only events with Total Wait Time (s) >= .001 are shown
-> ordered by Total Wait Time desc, Waits desc (idle events last)
Avg %Total
%Tim Total Wait wait Waits Call
Event Waits out Time (s) (ms) /txn Time
enq: TX - row lock contentio 4,480 0 434 97 0.0 25.8
log file sync 284,167 0 185 1 1.5 11.0
Disk file operations I/O 8,741 0 4 0 0.0 .2
direct path write 13,247 0 3 0 0.1 .2
db file sequential read 6,058 0 1 0 0.0 .1
buffer busy waits 1,800 0 1 1 0.0 .1
SQL*Net more data to client 29,161 0 1 0 0.2 .1
direct path read 7,696 0 1 0 0.0 .0
db file scattered read 316 0 1 2 0.0 .0
latch: shared pool 144 0 0 2 0.0 .0
CSS initialization 30 0 0 3 0.0 .0
cursor: pin S 10 0 0 9 0.0 .0
row cache lock 41 0 0 2 0.0 .0
latch: row cache objects 19 0 0 3 0.0 .0
log file switch (private str 8 0 0 7 0.0 .0
library cache: mutex X 28 0 0 2 0.0 .0
latch: cache buffers chains 54 0 0 1 0.0 .0
latch free 290 0 0 0 0.0 .0
control file sequential read 1,568 0 0 0 0.0 .0
log file switch (checkpoint 4 0 0 6 0.0 .0
direct path sync 8 0 0 3 0.0 .0
latch: redo allocation 60 0 0 0 0.0 .0
SQL*Net break/reset to clien 34 0 0 1 0.0 .0
latch: enqueue hash chains 45 0 0 0 0.0 .0
latch: cache buffers lru cha 7 0 0 2 0.0 .0
latch: session allocation 5 0 0 1 0.0 .0
latch: object queue header o 6 0 0 1 0.0 .0
ASM file metadata operation 30 0 0 0 0.0 .0
latch: In memory undo latch 15 0 0 0 0.0 .0
latch: undo global data 8 0 0 0 0.0 .0
SQL*Net message from client 6,362,536 0 278,225 44 33.7
jobq slave wait 7,270 100 3,635 500 0.0
SQL*Net more data from clien 7,976 0 15 2 0.0
SQL*Net message to client 6,362,544 0 8 0 33.7
Background Wait Events DB/Inst: XXXXXs Snaps: 5635-5636
-> Only events with Total Wait Time (s) >= .001 are shown
-> ordered by Total Wait Time desc, Waits desc (idle events last)
Avg %Total
%Tim Total Wait wait Waits Call
Event Waits out Time (s) (ms) /txn Time
log file parallel write 299,537 0 164 1 1.6 9.7
log file sequential read 698 0 16 24 0.0 1.0
db file parallel write 9,556 0 13 1 0.1 .8
os thread startup 146 0 10 70 0.0 .6
control file parallel write 2,037 0 2 1 0.0 .1
Log archive I/O 35 0 1 30 0.0 .1
LGWR wait for redo copy 2,447 0 0 0 0.0 .0
db file async I/O submit 9,556 0 0 0 0.1 .0
db file sequential read 145 0 0 2 0.0 .0
Disk file operations I/O 349 0 0 0 0.0 .0
db file scattered read 30 0 0 4 0.0 .0
control file sequential read 5,837 0 0 0 0.0 .0
ADR block file read 19 0 0 4 0.0 .0
ADR block file write 5 0 0 15 0.0 .0
direct path write 14 0 0 2 0.0 .0
direct path read 3 0 0 7 0.0 .0
latch: shared pool 3 0 0 6 0.0 .0
log file single write 56 0 0 0 0.0 .0
latch: redo allocation 53 0 0 0 0.0 .0
latch: active service list 1 0 0 3 0.0 .0
latch free 11 0 0 0 0.0 .0
rdbms ipc message 314,523 5 57,189 182 1.7
Space Manager: slave idle wa 4,086 88 18,996 4649 0.0
DIAG idle wait 7,185 100 7,186 1000 0.0
Streams AQ: waiting for time 2 50 4,909 ###### 0.0
Streams AQ: qmn slave idle w 129 0 3,612 28002 0.0
Streams AQ: qmn coordinator 258 50 3,612 14001 0.0
smon timer 43 2 3,605 83839 0.0
pmon timer 1,199 99 3,596 2999 0.0
SQL*Net message from client 17,019 0 31 2 0.1
SQL*Net message to client 12,762 0 0 0 0.1
class slave wait 28 0 0 0 0.0
thank you very much!Hi: just know it now: it is a large amount of 'concurrent transaction' designed in this "Volume Test" - to simulate large incoming transaction volme, so I guess wait in eq:TX - row is expected.
The fact: (1) redo logs at uat server is known to not well-tune for configurations (2) volume test slow 5%, however data amount in its test is kept the same by each time import production data, by the team. So why it slowed 5% this year?
The wait histogram is pasted below, any one interest to take a look? any ideas?
Wait Event Histogram DB/Inst: XXXX/XXXX Snaps: 5635-5636
-> Total Waits - units: K is 1000, M is 1000000, G is 1000000000
-> % of Waits - column heading: <=1s is truly <1024ms, >1s is truly >=1024ms
-> % of Waits - value: .0 indicates value was <.05%, null is truly 0
-> Ordered by Event (idle events last)
Total ----------------- % of Waits ------------------
Event Waits <1ms <2ms <4ms <8ms <16ms <32ms <=1s >1s
ADR block file read 19 26.3 5.3 10.5 57.9
ADR block file write 5 40.0 60.0
ADR file lock 6 100.0
ARCH wait for archivelog l 14 100.0
ASM file metadata operatio 30 100.0
CSS initialization 30 100.0
Disk file operations I/O 9090 97.2 1.4 .6 .4 .2 .1 .1
LGWR wait for redo copy 2447 98.5 .5 .4 .2 .2 .2 .1
Log archive I/O 35 40.0 8.6 25.7 2.9 22.9
SQL*Net break/reset to cli 34 85.3 8.8 5.9
SQL*Net more data to clien 29K 99.9 .0 .0 .0 .0 .0
buffer busy waits 1800 96.8 .7 .7 .6 .3 .4 .5
control file parallel writ 2037 90.7 5.0 2.1 .8 1.0 .3 .1
control file sequential re 7405 100.0 .0
cursor: pin S 10 10.0 90.0
db file async I/O submit 9556 99.9 .0 .0 .0
db file parallel read 1 100.0
db file parallel write 9556 62.0 32.4 1.7 .8 1.5 1.3 .1
db file scattered read 345 72.8 3.8 2.3 11.6 9.0 .6
db file sequential read 6199 97.2 .2 .3 1.6 .7 .0 .0
direct path read 7699 99.1 .4 .2 .1 .1 .0
direct path sync 8 25.0 37.5 12.5 25.0
direct path write 13K 97.8 .9 .5 .4 .3 .1 .0
enq: TX - row lock content 4480 .4 .7 1.3 3.0 6.8 12.3 75.4 .1
latch free 301 98.3 .3 .7 .7
latch: In memory undo latc 15 93.3 6.7
latch: active service list 1 100.0
latch: cache buffers chain 55 94.5 3.6 1.8
latch: cache buffers lru c 9 88.9 11.1
latch: call allocation 6 100.0
latch: checkpoint queue la 3 100.0
latch: enqueue hash chains 45 97.8 2.2
latch: messages 4 100.0
latch: object queue header 7 85.7 14.3
latch: redo allocation 113 97.3 1.8 .9
latch: row cache objects 19 89.5 5.3 5.3
latch: session allocation 5 80.0 20.0
latch: shared pool 147 90.5 1.4 2.7 1.4 .7 1.4 2.0
latch: undo global data 8 100.0
library cache: mutex X 28 89.3 3.6 3.6 3.6
log file parallel write 299K 95.6 2.6 1.0 .4 .3 .2 .0
log file sequential read 698 29.5 .1 4.6 46.8 18.9
log file single write 56 100.0
log file switch (checkpoin 4 25.0 50.0 25.0
log file switch (private s 8 12.5 37.5 50.0
log file sync 284K 93.3 3.7 1.4 .7 .5 .3 .1
os thread startup 146 100.0
row cache lock 41 85.4 9.8 2.4 2.4
DIAG idle wait 7184 100.0
SQL*Net message from clien 6379K 86.6 5.1 2.9 1.3 .7 .3 2.8 .3
SQL*Net message to client 6375K 100.0 .0 .0 .0 .0 .0 .0
Wait Event Histogram DB/Inst: XXXX/xxxx Snaps: 5635-5636
-> Total Waits - units: K is 1000, M is 1000000, G is 1000000000
-> % of Waits - column heading: <=1s is truly <1024ms, >1s is truly >=1024ms
-> % of Waits - value: .0 indicates value was <.05%, null is truly 0
-> Ordered by Event (idle events last)
Total ----------------- % of Waits ------------------
Event Waits <1ms <2ms <4ms <8ms <16ms <32ms <=1s >1s
SQL*Net more data from cli 7976 99.7 .1 .1 .0 .1
Space Manager: slave idle 4086 .1 .2 .0 .0 .3 3.2 96.1
Streams AQ: qmn coordinato 258 49.2 .8 50.0
Streams AQ: qmn slave idle 129 100.0
Streams AQ: waiting for ti 2 50.0 50.0
class slave wait 28 92.9 3.6 3.6
jobq slave wait 7270 .0 100.0
pmon timer 1199 100.0
rdbms ipc message 314K 10.3 7.3 39.7 15.4 10.6 5.3 8.2 3.3
smon timer 43 100.0 -
Performance problem on wait event PX Deq: Execute Reply
Hi everybody
I encounter some performance problem, I've made a tkprof on a select statement and I saw that more than 95% of the elapsed time is due to event PX Deq: Execute Reply.
This request is not CPU or paging consuming. What is this event and how could I reduce it ? Could it be a disk problem ?
Thanks a lot, best regards
Greg
Here is a sample of my tkprof:
call count cpu elapsed disk query current rows
Parse 1 0.03 0.03 0 0 0 0
Execute 1 0.22 2.16 68 177 12 0
Fetch 2 0.17 511.97 38 40 0 1
total 4 0.42 514.16 106 217 12 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 38
Rows Row Source Operation
1 PX COORDINATOR (cr=202 pr=103 pw=0 time=513984636 us)
0 PX SEND QC (RANDOM) :TQ10003 (cr=0 pr=0 pw=0 time=0 us)
0 HASH GROUP BY (cr=0 pr=0 pw=0 time=0 us)
0 PX RECEIVE (cr=0 pr=0 pw=0 time=0 us)
0 PX SEND HASH :TQ10002 (cr=0 pr=0 pw=0 time=0 us)
0 HASH GROUP BY (cr=0 pr=0 pw=0 time=0 us)
0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 PX RECEIVE (cr=0 pr=0 pw=0 time=0 us)
0 PX SEND BROADCAST :TQ10000 (cr=0 pr=0 pw=0 time=0 us)
473 TABLE ACCESS FULL DIM_CALL_DISTANCE (cr=8 pr=7 pw=0 time=27259 us)
0 HASH JOIN (cr=0 pr=0 pw=0 time=0 us)
0 BUFFER SORT (cr=0 pr=0 pw=0 time=0 us)
0 PX RECEIVE (cr=0 pr=0 pw=0 time=0 us)
0 PX SEND BROADCAST :TQ10001 (cr=0 pr=0 pw=0 time=0 us)
4 TABLE ACCESS FULL DIM_AUDIT_CALL (cr=32 pr=31 pw=0 time=35037 us)
0 PX BLOCK ITERATOR PARTITION: 1 16 (cr=0 pr=0 pw=0 time=0 us)
0 TABLE ACCESS FULL FACT_CALL PARTITION: 1 48 (cr=0 pr=0 pw=0 time=0 us)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 67 0.05 0.95
os thread startup 4 0.21 0.80
PX Deq: Join ACK 4 0.00 0.00
PX Deq: Parse Reply 3 0.13 0.17
SQL*Net message to client 2 0.00 0.00
PX Deq: Execute Reply 304 1.96 511.68
db file scattered read 6 0.01 0.03
PX qref latch 12 0.00 0.00
SQL*Net message from client 2 94.93 94.94
PX Deq: Signal ACK 6 0.10 0.11
enq: PS - contention 1 0.00 0.00
********************************************************************************PX Deq: Execute Reply is an idle event associated with Parallel Query. Are your tables partitioned or have a degree greater then 1?
The tables appear to be small in size. The overhead associated with parallel query generally hinders response time on queries involving small tables. -
Hi
I would like to know if there is difference between bind join end hash join.
For example If I write sql code in My query tool (in Data Federator Query server administrator XI 3.0) it is traduced in a hashjoin(....);If I set system parameters in right way to produce bind join, hashjoin(...) is present again!
how do i understand the difference?
byeQuery to track the holder and waiter info
People who reach this place for a similar problem can use the above link to find their answer
Regards,
Vishal -
Hi ! I have the following wait events in my top timed and I don't know who originated them:
Wait Event Wait Time Summary Avg Wait Time (ms)
I# Class Event Waits %Timeouts Total(s) Avg(ms) %DB time Avg Min Max Std Dev Cnt
* DB CPU N/A N/A 59,651.48 N/A 45.87 2
User I/O db file sequential read 4,369,213 0.0 20,831.46 4.8 16.02 4.72 4.29 5.14 0.60 2
Other enq: CF - contention 155,822 3.9 10,390.74 66.7 7.99 68.62 60.31 76.94 11.76 2
System I/O RMAN backup & recovery I/O 87,205 0.0 5,477.09 62.8 9.15 62.81 62.81 62.81 1
Cluster gc current block 2-way 2,914,457 0.0 4,811.61 1.7 3.70 1.67 1.60 1.74 0.10 2
System I/O control file sequential read 3,038,672 0.0 3,762.66 1.2 2.89 1.24 1.22 1.27 0.04 2
Concurrenc os thread startup 2,842 0.0 3,695.14 1300.2 2.84 1311.83 1143.07 1480.59 238.66 2
System I/O log file parallel write 1,341,907 0.0 2,530.17 1.9 1.95 1.88 1.88 1.89 0.01 2
Other reliable message 471,495 0.1 2,388.01 5.1 1.84 5.08 4.12 6.03 1.35 2
Concurrenc row cache lock 3,135,774 0.0 2,224.53 0.7 1.71 0.72 0.68 0.75 0.05 2
1 DB CPU N/A N/A 22,584.30 N/A 37.75
User I/O db file sequential read 2,451,215 0.0
System I/O RMAN backup & recovery I/O 87,205 0.0
Other enq: CF - contention 59,735 5.3
Cluster gc current block 2-way 1,803,542 0.0
System I/O control file sequential read 1,831,180 0.0
Concurrenc os thread startup 1,323 0.0
System I/O log file parallel write 727,883 0.0
Cluster gc cr multi block request 523,744 0.0
Concurrenc row cache lock 1,830,913 0.0
2 DB CPU N/A N/A
User I/O db file sequential read 1,917,998 0.0
Other enq: CF - contention 96,087 3.0
Cluster gc current block 2-way 1,110,915 0.0
Concurrenc os thread startup 1,519 0.0
System I/O control file sequential read 1,207,492 0.0
User I/O direct path read 404,587 0.0
Other reliable message 233,033 0.1
System I/O log file parallel write 614,024 0.0
System I/O control file parallel write 128,905 0.0
Those are the most worrying events:
enq: CF - contention
I/O control file sequential read
Concurrenc os thread startup
I have been investigating and I wonder what is wrong to get Concurrenc os thread startup. According to one blog, os thread should be always related with network issues...
The awr snapshot is from my production window day.
Rac 11.2.0.3 two nodes on Solaris Sparc 10.I have studied the ASH in the problematic period and I have found that there are some full scans:
Summary of All User Input
Format : TEXT
DB Id : 2752323407
Inst num : 1
Begin time : 08-Feb-13 09:30:00
End time : 08-Feb-13 10:20:00
Slot width : Default
Report targets : 0
Report name : ashrpt_1_0208_1020.txt
ASH Report For dbp/dbp1
DB Name DB Id Instance Inst Num Release RAC Host
dbp 2752323407 dbp1 1 11.2.0.3.0 YES host-dbp-1
CPUs SGA Size Buffer Cache Shared Pool ASH Buffer Size
16 12,651M (100%) 10,048M (79.4%) 1,921M (15.2%) 32.0M (0.3%)
Analysis Begin Time: 08-Feb-13 09:30:00
Analysis End Time: 08-Feb-13 10:20:00
Elapsed Time: 50.0 (mins)
Begin Data Source: DBA_HIST_ACTIVE_SESS_HISTORY
in AWR snapshot 5100
End Data Source: DBA_HIST_ACTIVE_SESS_HISTORY
in AWR snapshot 5101
+ V$ACTIVE_SESSION_HISTORY
Sample Count: 10,069
Average Active Sessions: 33.56
Avg. Active Session per CPU: 2.10
Report Target: None specified
Top User Events DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Avg Active
Event Event Class % Event Sessions
library cache lock Concurrency 43.73 14.68
cursor: pin S wait on X Concurrency 18.61 6.25
CPU + Wait for CPU CPU 15.77 5.29
reliable message Other 5.88 1.97
enq: KO - fast object checkpoint Application 3.48 1.17
Top Background Events DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Avg Active
Event Event Class % Activity Sessions
CPU + Wait for CPU CPU 1.25 0.42
Top Cluster Events DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Event % Event Remote I % Activity
gc current block 2-way 1.72 2 1.72
gc cr grant 2-way 1.58 N/A 1.07
Top Event P1/P2/P3 Values DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Event % Event P1 Value, P2 Value, P3 Value % Activity
Parameter 1 Parameter 2 Parameter 3
library cache lock 43.75 "29115227816","29218763456"," 1.22
handle address lock address 100*mode+namespace
"29115227816","28694732944"," 1.20
"29115227816","28812373936"," 1.17
cursor: pin S wait on X 18.61 "1497800770","3934190043136", 1.54
idn value where
"1497800770","7773890805760", 1.15
reliable message 6.07 "30432532808","30354909248"," 0.13
channel context channel handle broadcast message
enq: KO - fast object checkpoi 3.49 "1263468550","65640","1" 0.52
name|mode 2 0
db file sequential read 1.81 "1","25220","1" 0.01
file# block# blocks
Top Service/Module DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Service Module % Activity Action % Action
dbp_DVEBMGS11 CL_SQL_STATEMENT======== 86.80 383 86.80
dbp_D10_0066 CL_SQL_STATEMENT======== 6.28 383 3.34
104 2.94
dbp_D10_0064 CL_SQL_STATEMENT======== 2.40 383 2.39
SYS$BACKGROUND UNNAMED 1.51 UNNAMED 1.51
Top Client IDs DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
No data exists for this section of the report.
Top SQL Command Types DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
-> 'Distinct SQLIDs' is the count of the distinct number of SQLIDs
with the given SQL Command Type found over all the ASH samples
in the analysis period
Distinct Avg Active
SQL Command Type SQLIDs % Activity Sessions
SELECT 485 94.56 31.74
ALTER TABLE 220 2.89 0.97
Top Phases of Execution DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Avg Active
Phase of Execution % Activity Sessions
Parse 67.50 22.66
SQL Execution 30.46 10.22
Hard Parse 5.37 1.80
Top Remote Instances DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Wait Class % Wait Remote I % Activity
Cluster 5.22 2 3.90
N/A 1.27
Top SQL with Top Events DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Sampled #
SQL ID Planhash of Executions % Activity
Event % Event Top Row Source % RwSrc
350v06jcnd822 N/A 0 18.03
library cache lock 9.41 ** Row Source Not Available ** 9.41
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
N/A 0 18.03
cursor: pin S wait on X 8.62 ** Row Source Not Available ** 8.62
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
48unmtd983uz6 N/A 0 16.75
library cache lock 12.87 ** Row Source Not Available ** 12.87
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
N/A 0 16.75
cursor: pin S wait on X 3.88 ** Row Source Not Available ** 3.88
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
350v06jcnd822 2426825131 0 15.49
library cache lock 9.74 ** Row Source Not Available ** 9.74
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
cursor: pin S wait on X 4.14 ** Row Source Not Available ** 4.14
CPU + Wait for CPU 1.61 SELECT STATEMENT 1.58
48unmtd983uz6 3511339786 0 14.98
library cache lock 11.50 ** Row Source Not Available ** 11.50
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
cursor: pin S wait on X 1.97 ** Row Source Not Available ** 1.97
CPU + Wait for CPU 1.51 SELECT STATEMENT 1.42
07tcvyb6frtkx 2929764020 1 1.87
gc cr grant 2-way 0.80 TABLE ACCESS - BY USER ROWID 0.75
SELECT "D3"."SID_0SHIP_TO" AS "SID" FROM "/BIC/FZ99IC035" "F" JOIN "/BIC/DZ99IC
0352" "D2" ON "F" . "KEY_Z99IC0352" = "D2" . "DIMID" JOIN "/BI0/XMATERIAL" "X9"
ON "D2" . "SID_0MATERIAL" = "X9" . "SID" JOIN "/BIC/DZ99IC0355" "D5" ON "F" .
"KEY_Z99IC0355" = "D5" . "DIMID" JOIN "/BIC/DZ99IC0353" "D3" ON "F" . "KEY_Z99
Top SQL with Top Events DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Sampled #
SQL ID Planhash of Executions % Activity
Event % Event Top Row Source % RwSrc
Top SQL with Top Row Sources DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Sampled #
SQL ID PlanHash of Executions % Activity
Row Source % RwSrc Top Event % Event
350v06jcnd822 N/A 0 18.03
** Row Source Not Available ** 18.03 library cache lock 9.41
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
48unmtd983uz6 N/A 0 16.75
** Row Source Not Available ** 16.75 library cache lock 12.87
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
350v06jcnd822 2426825131 0 15.49
** Row Source Not Available ** 13.91 library cache lock 9.74
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
SELECT STATEMENT 1.58 CPU + Wait for CPU 1.58
48unmtd983uz6 3511339786 0 14.98
** Row Source Not Available ** 13.56 library cache lock 11.50
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
SELECT STATEMENT 1.42 CPU + Wait for CPU 1.42
07tcvyb6frtkx 2929764020 1 1.87
TABLE ACCESS - BY USER ROWID 1.59 gc cr grant 2-way 0.75
SELECT "D3"."SID_0SHIP_TO" AS "SID" FROM "/BIC/FZ99IC035" "F" JOIN "/BIC/DZ99IC
0352" "D2" ON "F" . "KEY_Z99IC0352" = "D2" . "DIMID" JOIN "/BI0/XMATERIAL" "X9"
ON "D2" . "SID_0MATERIAL" = "X9" . "SID" JOIN "/BIC/DZ99IC0355" "D5" ON "F" .
"KEY_Z99IC0355" = "D5" . "DIMID" JOIN "/BIC/DZ99IC0353" "D3" ON "F" . "KEY_Z99
Top SQL using literals DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
-> FORCE_MATCHING_SIGNATURE is used to identify SQL statements that are
identical except for their use of literals.
-> Please refer to the Oracle Database Reference to understand how
the FORCE_MATCHING_SIGNATURE is derived.
# of Sampled
FORCE_MATCHING_SIGNATURE % Activity SQL Versions
Example SQL 1
Example SQL 2
1021017294885722791 2.89 218
0htvt0stu1vtq
SELECT COUNT(*) FROM "/BIC/FZ99IC003" WHERE "KEY_Z99IC003P" = :A0
0htvt0stu1vtq
Top Parsing Module/Action DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
Module Action % Activ Event
CL_SQL_STATEMENT============== 383 67.25 library
383 cursor:
383 CPU + Wa
Top Sessions running PQs DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
-> This section aggregates all the work done by the PQ slaves into
the session issuing the parallel query.
Sid,Srl# (Inst) % Activity SQL ID Event % Event
User Program
1506, 19(1) 33.57 350v06jcnd822 library cache lock 19.15
UserID:
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
cursor: pin S wait on X 12.76
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
CPU + Wait for CPU 1.61
SELECT "DT"."SID_0CALMONTH" AS "S____048" ,"D3"."SID_0MATERIAL" AS "S____006" ,
"DU"."SID_0UNIT" AS "S____023" ,"DT"."SID_0CALDAY" AS "S____021" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" ,"X33"."S__Z99GRMAT" AS "S_
___4443" , SUM ( "F"."QUANTITY" ) AS "Z____1299" , COUNT( * ) AS "Z____016"
2255, 1067(1) 31.78 48unmtd983uz6 library cache lock 24.37
UserID:
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
cursor: pin S wait on X 5.85
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
CPU + Wait for CPU 1.51
SELECT "DT"."SID_0CALDAY" AS "S____021" ,"DT"."SID_0CALMONTH" AS "S____048" ,"D
3"."SID_0MATERIAL" AS "S____006" ,"DU"."SID_0UNIT" AS "S____023" ,"D2"."SID_0MET
YPE" AS "S____1342" ,"D2"."SID_0VTYPE" AS "S____504" , SUM ( "F"."QUANTITY" )
AS "Z____1299" , COUNT( * ) AS "Z____016" FROM "/BIC/FZ99IC114" "F" JOIN "/BIC
Top DB Objects DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
-> With respect to Application, Cluster, User I/O and buffer busy waits only.
Object ID % Activity Event % Event
Object Name (Type) Tablespace
13661539 2.45 gc buffer busy acquire 0.87
SAPSR3./BIC/EZ99IC013 (TABLE) PSAPSR3SSD
Top DB Files DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
-> With respect to Cluster and User I/O events only.
File ID % Activity Event % Event
File Name Tablespace
53 3.60 gc current block 2-way 0.98
+dbp_DATA/dbp_2/datafile/psapsr3ssd.315.805562113 PSAPSR3SSD
Top Latches DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
No data exists for this section of the report.
Activity Over Time DB/Inst: dbp/dbp1 (Feb 08 09:30 to 10:20)
-> Analysis period is divided into smaller time slots
-> Top 3 events are reported in each of those slots
-> 'Slot Count' shows the number of ASH samples in that slot
-> 'Event Count' shows the number of ASH samples waiting for
that event in that slot
-> '% Event' is 'Event Count' over all ASH samples in the analysis period
Slot Event
Slot Time (Duration) Count Event Count % Event
09:30:00 (5.0 min) 260 gc buffer busy acquire 43 0.43
reliable message 34 0.34
CPU + Wait for CPU 29 0.29
09:35:00 (5.0 min) 303 CPU + Wait for CPU 76 0.75
db file sequential read 40 0.40
gc buffer busy acquire 39 0.39
09:40:00 (5.0 min) 366 CPU + Wait for CPU 209 2.08
db file sequential read 26 0.26
gc current block 2-way 22 0.22
09:45:00 (5.0 min) 511 CPU + Wait for CPU 249 2.47
cursor: pin S wait on X 93 0.92
reliable message 45 0.45
09:50:00 (5.0 min) 2,245 cursor: pin S wait on X 1,442 14.32
library cache lock 407 4.04
reliable message 112 1.11
09:55:00 (5.0 min) 2,037 library cache lock 1,378 13.69
cursor: pin S wait on X 297 2.95
CPU + Wait for CPU 125 1.24
10:00:00 (5.0 min) 1,823 library cache lock 1,371 13.62
CPU + Wait for CPU 263 2.61
reliable message 72 0.72
10:05:00 (5.0 min) 1,273 library cache lock 866 8.60
CPU + Wait for CPU 155 1.54
reliable message 96 0.95
10:10:00 (5.0 min) 798 library cache lock 350 3.48
CPU + Wait for CPU 287 2.85
reliable message 54 0.54
10:15:00 (5.0 min) 436 CPU + Wait for CPU 200 1.99
reliable message 61 0.61
enq: KO - fast object checkpoi 42 0.42
-------------------------------------------------------------Problems are always on instance 1.
The queries are different each day, the top sql with performance problem changes the sql_id and I cant attack them or apply a sql profile or tune them because they only execute during a period.
Any idea?
:( -
PX Deq: Execute Reply - Wait event
I am seeing PX Deq: Execute Reply wait event for a query which returns no data. From metalink I see this can be ignored.
Any suggestion is appreciated.I am attaching explain plan. Not sure if this helps. Another prod database which has similiar plan works fine.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=205424 Card=1 Bytes=
142)
1 0 TABLE ACCESS* (BY INDEX ROWID) OF 'STG_TRD_SWAP_CF' (Cost= :Q804383
4 Card=1 Bytes=82) 001
2 1 NESTED LOOPS* (Cost=205424 Card=1 Bytes=142) :Q804383
001
3 2 HASH JOIN* (Cost=59005 Card=146419 Bytes=8785140) :Q804383
001
4 3 NESTED LOOPS* (Cost=3 Card=1 Bytes=25) :Q804383
000
5 4 VIEW (Cost=2 Card=1 Bytes=13)
6 5 SORT (AGGREGATE)
7 6 INDEX (FULL SCAN (MIN/MAX)) OF 'T_HUB_CONTROL_
TRADE_HDR_PK' (UNIQUE) (Cost=2 Card=579 Bytes=2316)
8 4 TABLE ACCESS (BY INDEX ROWID) OF 'T_HUB_CONTROL_TR
ADE_HDR' (Cost=1 Card=1 Bytes=12)
9 8 INDEX (UNIQUE SCAN) OF 'T_HUB_CONTROL_TRADE_HDR_
PK' (UNIQUE)
10 3 PARTITION RANGE* (ALL) :Q804383
001
11 10 PARTITION LIST* (ALL) :Q804383
001
12 11 TABLE ACCESS* (FULL) OF 'T_HUB_TRD_MAIN' (Cost=5 :Q804383
9002 Card=84630120 Bytes=2962054200) 001
13 2 INDEX* (RANGE SCAN) OF 'STG_TRD_SWAP_CF_PK' (UNIQUE) ( :Q804383
Cost=3 Card=1) 001
1 PARALLEL_COMBINED_WITH_CHILD
2 PARALLEL_TO_SERIAL SELECT /*+ ORDERED NO_EXPAND USE_NL(A2) INDE
X(A2 "STG_TRD_SWAP_CF_PK") */ A1.C0,
3 PARALLEL_COMBINED_WITH_PARENT
4 PARALLEL_FROM_SERIAL
10 PARALLEL_COMBINED_WITH_PARENT
11 PARALLEL_COMBINED_WITH_PARENT
12 PARALLEL_COMBINED_WITH_PARENT
13 PARALLEL_COMBINED_WITH_PARENT -
Gc quiesce wait event on creating an index
Hi,
We're running Oracle 10.2.0.3 in a 2-node RAC.
Today we encountered something strange:
On creating an index on an empty table the session ended up in the 'waiting' state. The event was: 'gc quiesce wait'.
In an attempt to solve it we stopped 1 instance. This didn't help a bit.
Killing the session and restarting the index creation had the same result.
Eventually we bounced the database and then things went fine.
Can anyone explain what might have caused this? I've tried to find an explanation on the internet but can’t really find anything on this wait event.
I’m a newbie on RAC and would like to learn from this…
Regards,
RenéMladen Gogala wrote once:
To "quiesce" database means to suspend it for a brief period of time.
In RAC context, GC quiesce probably means to quiesce a resource Database.
This is an educated guess, only. If this table is heavily in use,
the instance you're inserting into may be pulling huge numbers of
blocks from the other nodes and becoming their master. You are waiting
for remastering. Make sure that all inserts are being done on the same
instance.
Look at the list of bugs in the heavenly patchset, the one that will be
released week after the judgment day, 10.2.0.4. The list of bug fixes is
available in the doc id: 401436.1.
Also, dump systemstate, level 12 when you observe such waits, send it to
Oracle Corp. and work with them. Using HANGANALYZE might not be a bad idea
in this situation.
K. Gopalakrishnan, the author of the RAC book might be having to say about
that, as well. I don't have his book right here and I can't look into it.
I looked into Gopal and Kirti's "Oracle10g Wait Event" book, but there is
nothing in there.
Mladen Gogala
http://mgogala.freehostia.com -
Getting wait event "direct path write temp" during query execution
Hi All,
While executing one query in database, it is taking longer time and failing with error "ORA-01652: unable to extend temp segment by 1280 in tablespace PSTEMP".
I have increaesd the Temp tablespace size also till 96GB, Database size is 120GB.
I have upgraded the database from 10.2.0.3 to 11.2.0.3 version last month.
same query is running fine in other databases on same version.
It is giving me "Direct write temp path" wait event.
server load is also normal.
I have increased pga_aggregate_target upto 512MB but it has not solved my problem
Can you please help me out to solve this issue.Hi Nicolay,
Please find below output from that query :
SQL>
SELECT DBMS_SQLTUNE.report_sql_monitor(
sql_id => '(*******',
type => 'TEXT',
report_level => 'ALL') AS report
FROM dual;SQL> 2 3 4 5
SQL Monitoring Report
SQL Text
SELECT ASGN.TRANSACTIONID ,ASGN.UPA_CLIENT_ID FROM PS_UPA_CM_PRE_ASGN ASGN ,PS_UPA_CLIENT_TBL CL ,PS_UPA_CM_ADMIN_WL WL ,PSXLATITEM XCT ,PSXLATITEM XCS ,PS_PWC_INDUSTR_TBL IND ,PS_PWC_SUBIND_TBL SCT ,PS_UPA_FIN_REG_TBL REG ,PS_UPA_CM_MKT_VW1 MKT WHERE ASGN.UPA_CLIENT_ID = CL.UPA_CLIENT_ID AND CL.UPA_CM_GRP_ID = ' ' AND ASGN.UPA_CM_ADMIN_ACT = 'RCD' AND ASGN.UPA_CM_CLT_ROLENBR = WL.UPA_CM_CLT_ROLENBR AND ASGN.UPA_CM_ROLENBR_SEQ = WL.UPA_CM_ROLENBR_SEQ AND WL.UPA_CM_WL_STATUS = 'A' AND
WL.UPA_CM_ADMIN_ACT = 'RCD' AND CL.EFFDT = ( SELECT MAX(CL1.EFFDT) FROM PS_UPA_CLIENT_TBL CL1 WHERE CL1.UPA_CLIENT_ID = CL.UPA_CLIENT_ID AND CL1.EFFDT <= SYSDATE) AND CL.EFF_STATUS = 'A' AND CL.UPA_MONTH_DAY <> ' ' AND CL.UPA_CLIENT_TYPE <> ' ' AND CL.UPA_CLIENT_SEGMENT <> ' ' AND CL.PWC_INDUSTRY <> ' ' AND CL.PWC_SUB_INDUSTRY <> ' ' AND CL.UPA_FIN_REGION <> ' ' AND CL.UPA_STRAT_MKT <> ' ' AND CL.UPA_CLT_PRIORITIZ <> ' ' /*Harieash - Aadded as part of PR support IR 43024 */ AND XCT.FIELDNAME =
'UPA_CLIENT_TYPE' AND XCT.FIELDVALUE = CL.UPA_CLIENT_TYPE AND XCT.EFFDT = ( SELECT MAX(XCT1.EFFDT) FROM PSXLATITEM XCT1 WHERE XCT1.FIELDNAME = XCT.FIELDNAME AND XCT1.FIELDVALUE = XCT.FIELDVALUE AND XCT1.EFFDT <= SYSDATE) AND XCT.EFF_STATUS = 'A' AND XCS.FIELDNAME = 'UPA_CLIENT_SEGMENT' AND XCS.FIELDVALUE = CL.UPA_CLIENT_SEGMENT AND XCS.EFFDT = ( SELECT MAX(XCS1.EFFDT) FROM PSXLATITEM XCS1 WHERE XCS1.FIELDNAME = XCS.FIELDNAME AND XCS1.FIELDVALUE = XCS.FIELDVALUE AND XCS1.EFFDT <= SYSDATE) AND
XCS.EFF_STATUS = 'A' AND IND.SETID = 'USA00' AND CL.PWC_INDUSTRY = IND.PWC_INDUSTRY AND IND.EFFDT = ( SELECT MAX(IND1.EFFDT) FROM PS_PWC_INDUSTR_TBL IND1 WHERE IND1.SETID = IND.SETID AND IND1.PWC_INDUSTRY = IND.PWC_INDUSTRY AND IND1.EFFDT <= SYSDATE) AND IND.EFF_STATUS = 'A' AND SCT.SETID = 'USA00' AND CL.PWC_SUB_INDUSTRY = SCT.PWC_SUB_INDUSTRY AND SCT.EFFDT = ( SELECT MAX(SCT1.EFFDT) FROM PS_PWC_SUBIND_TBL SCT1 WHERE SCT1.SETID = SCT.SETID AND SCT1.PWC_SUB_INDUSTRY = SCT.PWC_SUB_INDUSTRY AND
SCT1.EFFDT <= SYSDATE) AND SCT.EFF_STATUS = 'A' AND REG.SETID = 'USA00' AND CL.UPA_FIN_REGION = REG.UPA_FIN_REGION AND REG.EFFDT = ( SELECT MAX(REG1.EFFDT) FROM PS_UPA_FIN_REG_TBL REG1 WHERE REG1.SETID = 'USA00' AND REG1.UPA_FIN_REGION = REG.UPA_FIN_REGION AND REG1.EFFDT <= SYSDATE) AND REG.EFF_STATUS = 'A' AND CL.UPA_STRAT_MKT = MKT.UPA_STRAT_MKT
Global Information
Status : EXECUTING
Instance ID : 1
Session : *******
SQL ID : *******
SQL Execution ID : *********
Execution Started : 11/12/2012 04:31:25
First Refresh Time : 11/12/2012 04:31:33
Last Refresh Time : 11/12/2012 04:31:55
Duration : 31s
Module/Action : ***** (TNS V1-V3)/-
Service : SYS$USERS
Program : ******* (TNS V1-V3)
Global Stats
=========================================================
| Elapsed | Cpu | IO | Buffer | Write | Write |
| Time(s) | Time(s) | Waits(s) | Gets | Reqs | Bytes |
=========================================================
| 33 | 25 | 7.30 | 162 | 4755 | 557MB |
=========================================================
SQL Plan Monitoring Details (Plan Hash Value=2177602723)
========================================================================================================================================================================================================
| Id | Operation | Name | Rows | Cost | Time | Start | Execs | Rows | Write | Write | Mem | Temp | Activity | Activity Detail |
| | | | (Estim) | | Active(s) | Active | | (Actual) | Reqs | Bytes | | | (%) | (# samples) |
========================================================================================================================================================================================================
| 0 | SELECT STATEMENT | | | | | | 1 | | | | | | | |
| 1 | NESTED LOOPS | | | | | | 1 | | | | | | | |
| 2 | NESTED LOOPS | | 1 | 491 | | | 1 | | | | | | | |
| -> 3 | HASH JOIN | | 120 | 130 | 31 | +1 | 1 | 0 | 4011 | 470MB | 95M | 598M | 80.65 | Cpu (19) |
| | | | | | | | | | | | | | | direct path write temp (6) |
| -> 4 | MERGE JOIN CARTESIAN | | 120 | 61 | 23 | +8 | 1 | 13M | | | | | | |
| -> 5 | MERGE JOIN CARTESIAN | | 1 | 38 | 23 | +8 | 1 | 1870 | | | | | | |
| -> 6 | MERGE JOIN CARTESIAN | | 1 | 37 | 23 | +8 | 1 | 70 | | | | | | |
| -> 7 | MERGE JOIN CARTESIAN | | 1 | 35 | 23 | +8 | 1 | 12 | | | | | | |
| 8 | MERGE JOIN CARTESIAN | | 1 | 33 | 21 | +8 | 1 | 2 | | | | | | |
| 9 | MERGE JOIN CARTESIAN | | 1 | 31 | 1 | +8 | 1 | 1 | | | | | | |
| 10 | VIEW | PS_UPA_CM_MKT_VW1 | 1 | 29 | 1 | +8 | 1 | 1 | | | | | | |
| 11 | SORT UNIQUE | | 1 | 28 | 1 | +8 | 1 | 1 | | | | | | |
| 12 | TABLE ACCESS BY INDEX ROWID | PS_UPA_ST_MKT_TBL | 10 | 2 | 1 | +8 | 1 | 43 | | | | | | |
| 13 | INDEX SKIP SCAN | PS0UPA_ST_MKT_TBL | 10 | 1 | 1 | +8 | 1 | 43 | | | | | | |
| 14 | SORT AGGREGATE | | 1 | | 1 | +8 | 33 | 33 | | | | | | |
| 15 | INDEX SKIP SCAN | PS0UPA_ST_MKT_TBL | 2 | 1 | 1 | +8 | 33 | 50 | | | | | | |
| 16 | BUFFER SORT | | 1 | 31 | 1 | +8 | 1 | 1 | | | | | | |
| 17 | TABLE ACCESS BY INDEX ROWID | PSXLATITEM | 1 | 2 | 1 | +8 | 1 | 14 | | | | | | |
| 18 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 1 | 14 | | | | | | |
| 19 | SORT AGGREGATE | | 1 | | 1 | +8 | 14 | 14 | | | | | | |
| 20 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 14 | 14 | | | | | | |
| 21 | BUFFER SORT | | 1 | 31 | 21 | +8 | 1 | 2 | | | | | | |
| 22 | TABLE ACCESS BY INDEX ROWID | PSXLATITEM | 1 | 2 | 1 | +8 | 1 | 2 | | | | | | |
| 23 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 1 | 2 | | | | | | |
| 24 | SORT AGGREGATE | | 1 | | 1 | +8 | 2 | 2 | | | | | | |
| 25 | INDEX RANGE SCAN | PS_PSXLATITEM | 1 | 1 | 1 | +8 | 2 | 2 | | | | | | |
| -> 26 | BUFFER SORT | | 3 | 33 | 23 | +8 | 2 | 12 | | | | | | |
| 27 | TABLE ACCESS BY INDEX ROWID | PS_PWC_INDUSTR_TBL | 3 | 2 | 1 | +8 | 1 | 10 | | | | | | |
| 28 | INDEX SKIP SCAN | PS0PWC_INDUSTR_TBL | 6 | 1 | 1 | +8 | 1 | 26 | | | | | | |
| 29 | SORT AGGREGATE | | 1 | | 1 | +8 | 26 | 26 | | | | | | |
| 30 | FIRST ROW | | 1 | 1 | 1 | +8 | 26 | 26 | | | | | | |
| -> 31 | INDEX RANGE SCAN (MIN/MAX) | PS_PWC_INDUSTR_TBL | 1 | 1 | 23 | +8 | 26 | 26 | | | | | | |
| -> 32 | BUFFER SORT | | 3 | 35 | 23 | +8 | 12 | 70 | | | | | | |
| 33 | TABLE ACCESS BY INDEX ROWID | PS_UPA_FIN_REG_TBL | 3 | 2 | 1 | +8 | 1 | 6 | | | | | | |
| 34 | INDEX SKIP SCAN | PS0UPA_FIN_REG_TBL | 6 | 1 | 1 | +8 | 1 | 12 | | | | | | |
| 35 | SORT AGGREGATE | | 1 | | 1 | +8 | 12 | 12 | | | | | | |
| 36 | FIRST ROW | | 1 | 1 | 1 | +8 | 12 | 12 | | | | | | |
| -> 37 | INDEX RANGE SCAN (MIN/MAX) | PS_UPA_FIN_REG_TBL | 1 | 1 | 23 | +8 | 12 | 12 | | | | | | |
| -> 38 | BUFFER SORT | | 14 | 36 | 23 | +8 | 70 | 1870 | | | | | | |
| 39 | INDEX RANGE SCAN | PSAPWC_SUBIND_TBL | 14 | 1 | 1 | +8 | 1 | 27 | | | | | | |
| 40 | SORT AGGREGATE | | 1 | | 1 | +8 | 184 | 184 | | | | | | |
| 41 | FIRST ROW | | 1 | 2 | 1 | +8 | 184 | 184 | | | | | | |
| -> 42 | INDEX RANGE SCAN (MIN/MAX) | PS_PWC_SUBIND_TBL | 1 | 2 | 23 | +8 | 184 | 184 | | | | | | |
| 43 | BUFFER SORT | | 794 | 60 | 29 | +2 | 1870 | 13M | | | 306K | | 19.35 | Cpu (6) |
| 44 | TABLE ACCESS FULL | PS_UPA_CM_ADMIN_WL | 794 | 23 | 1 | +8 | 1 | 7052 | | | | | | |
| 45 | TABLE ACCESS FULL | PS_UPA_CM_PRE_ASGN | 3536 | 69 | | | | | | | | | | |
| 46 | INDEX RANGE SCAN | PSDUPA_CLIENT_TBL | 1 | 2 | | | | | | | | | | |
| 47 | SORT AGGREGATE | | 1 | | | | | | | | | | | |
| 48 | FIRST ROW | | 1 | 3 | | | | | | | | | | |
| 49 | INDEX RANGE SCAN (MIN/MAX) | PS_UPA_CLIENT_TBL | 1 | 3 | | | | | | | | | | |
| 50 | TABLE ACCESS BY INDEX ROWID | PS_UPA_CLIENT_TBL | 1 | 3 | | | | | | | | | | |
========================================================================================================================================================================================================
SQL>
spool offSQL> -
My wait events - can anyone see a problem?
hi,
this is what i have, can anyone see a problem?
thanks
EVENT TOTAL_WAITS PCT_WAITS TIME_WAIT_SEC PCT_TIME_WAITED TOTAL_TIMEOUTS PCT_TIMEOUTS AVERAGE_WAIT_SEC
Streams AQ: qmn slave idle wait 148147 .3 4051461.88 38.04 3478 .07 27.35
Streams AQ: qmn coordinator idle wa 291006 .59 3962890.53 37.21 148370 3.13 13.62
it
Streams AQ: waiting for time manage 948 0 2021434.2 18.98 948 .02 2132.31
ment or cleanup tasks
control file parallel write 1292057 2.64 266839.64 2.51 0 0 .21
log file parallel write 28433394 58.02 134658.55 1.26 0 0 0
db file sequential read 8307195 16.95 69830.07 .66 0 0 .01
free buffer waits 3117839 6.36 43374.04 .41 3106093 65.55 .01
log buffer space 55520 .11 20810.2 .2 20235 .43 .37
db file scattered read 583604 1.19 18169.58 .17 0 0 .03
write complete waits 17946 .04 17536.66 .16 17941 .38 .98
log file sync 282268 .58 10005.35 .09 9369 .2 .04
enq: RO - fast object reuse 26602 .05 6623.44 .06 2171 .05 .25
enq: CF - contention 1839 0 5178.14 .05 1723 .04 2.82
Streams AQ: qmn coordinator waiting 999 0 4311.01 .04 883 .02 4.32
for slave to start
buffer busy waits 32464 .07 3898.51 .04 3950 .08 .12
control file sequential read 2199199 4.49 3558.34 .03 0 0 0
SGA: MMAN sleep for component shrin 234330 .48 2523.65 .02 234216 4.94 .01
k
buffer exterminate 1583 0 1539.72 .01 1573 .03 .97
library cache pin 317 0 927.71 .01 316 .01 2.93
enq: CI - contention 1829 0 570.84 .01 159 0 .31
log file switch completion 1658 0 517.18 0 425 .01 .31
enq: TX - row lock contention 257 0 438.8 0 149 0 1.71
read by other session 27269 .06 355.17 0 52 0 .01
os thread startup 3869 .01 338.67 0 98 0 .09
latch: shared pool 760 0 285.87 0 0 0 .38
latch: row cache objects 664 0 250 0 0 0 .38
Data file init write 16324 .03 231.59 0 0 0 .01
reliable message 19189 .04 218.16 0 170 0 .01
latch: library cache 483 0 172.51 0 0 0 .36
SQL*Net message from dblink 1143086 2.33 128.69 0 0 0 0
latch free 6091 .01 121.1 0 0 0 .02
library cache load lock 90 0 89.48 0 18 0 .99
log file single write 1894 0 69.76 0 0 0 .04
cursor: pin S wait on X 5183 .01 55.87 0 5165 .11 .01
local write wait 6732 .01 42.58 0 2 0 .01
log file switch (checkpoint incompl 95 0 42.11 0 30 0 .44
ete)
row cache lock 119 0 30.96 0 10 0 .26
SQL*Net more data from dblink 17198 .04 25.92 0 0 0 0
log file switch (private strand flu 69 0 17.54 0 5 0 .25
sh incomplete)
enq: HW - contention 180 0 16.53 0 5 0 .09
enq: PR - contention 9 0 14.5 0 2 0 1.61
enq: JS - queue lock 51 0 12.36 0 0 0 .24
SQL*Net more data to client 48311 .1 11.66 0 0 0 0
enq: TM - contention 12 0 10.66 0 3 0 .89
class slave wait 3128 .01 7.03 0 1 0 0
JS coord start wait 68 0 6.42 0 68 0 .09
direct path write 92712 .19 6.06 0 0 0 0
control file heartbeat 1 0 3.91 0 1 0 3.91
PX Deq: Par Recov Execute 100 0 3.8 0 0 0 .04
log file sequential read 1900 0 2.88 0 0 0 0
single-task message 50 0 2.61 0 0 0 .05
enq: TX - contention 11 0 2.38 0 0 0 .22
undo segment extension 1181001 2.41 1.95 0 1180981 24.92 0
db file single write 165 0 1.3 0 0 0 .01
enq: TX - index contention 97 0 1.27 0 0 0 .01
LGWR wait for redo copy 20840 .04 .66 0 0 0 0
JS kgl get object wait 8 0 .63 0 8 0 .08
SQL*Net message to dblink 1143086 2.33 .55 0 0 0 0
kksfbc child completion 14 0 .55 0 11 0 .04
direct path read temp 217237 .44 .41 0 0 0 0
latch: cache buffers chains 2138 0 .37 0 0 0 0
latch: messages 1245 0 .27 0 0 0 0
latch: redo writing 786 0 .15 0 0 0 0
PX Deq: Par Recov Reply 65 0 .09 0 0 0 0
latch: checkpoint queue latch 171 0 .09 0 0 0 0
latch: redo allocation 1029 0 .08 0 0 0 0
latch: cache buffers lru chain 268 0 .07 0 0 0 0
SGA: allocation forcing component g 5 0 .05 0 2 0 .01
rowth
db file parallel read 83 0 .04 0 0 0 0
latch: In memory undo latch 558 0 .04 0 0 0 0
latch: object queue header operatio 338 0 .04 0 0 0 0
n
direct path read 5042 .01 .03 0 0 0 0
PX Deque wait 7 0 .02 0 0 0 0
direct path write temp 4691 .01 .02 0 0 0 0
enq: SQ - contention 1 0 .02 0 0 0 .02
latch: session allocation 190 0 .02 0 0 0 0
PX Deq: Join ACK 15 0 .01 0 0 0 0
cursor: pin S 894 0 .01 0 0 0 0
enq: TX - allocate ITL entry 37 0 .01 0 0 0 0
kkdlgon 15 0 .01 0 0 0 0
latch: enqueue hash chains 37 0 .01 0 0 0 0
library cache lock 1 0 .01 0 0 0 .01
Log archive I/O 1 0 0 0 0 0 0
PX Deq: Par Recov Change Vector 2 0 0 0 0 0 0
PX Deq: Signal ACK 3 0 0 0 0 0 0
PX Deq: Test for msg 1 0 0 0 0 0 0
PX qref latch 1 0 0 0 1 0 0
SQL*Net break/reset to dblink 5 0 0 0 0 0 0
SQL*Net more data to dblink 1 0 0 0 0 0 0
buffer deadlock 27 0 0 0 27 0 0
checkpoint completed 4 0 0 0 0 0 0
cursor: mutex S 3 0 0 0 0 0 0
cursor: mutex X 1 0 0 0 0 0 0
enq: JS - q mem clnup lck 1 0 0 0 0 0 0
enq: PS - contention 2 0 0 0 0 0 0
enq: US - contention 1 0 0 0 0 0 0
instance state change 2 0 0 0 0 0 0
latch: library cache lock 4 0 0 0 0 0 0
latch: library cache pin 1 0 0 0 0 0 0
latch: object queue header heap 8 0 0 0 0 0 0
latch: undo global data 3 0 0 0 0 0 0
recovery read 39 0 0 0 0 0 0Hi,
If its for a week than I won't bother. Probably you should try to get teh same report for these wait events in a much smaller period , like 20-30minutes of time period when your db is fully operational. If still at that time the wait events,these or any other, shoot up to high wait times, things can be investigated more deeply.
HTH
Aman.... -
Tuning SQL with heavy hash join
Hi all,
My database is 11.1. Rac 4 node.
The sql is so simple.
create table leon_12345
nologging
as
SELECT *
FROM OOOOOOOOOO a
FULL OUTER JOIN PPPPPPPPPPP b ON a.PRMTN_SKID =
b.PRMTN_SKID
AND a.PROD_SKID =
b.PROD_SKID
AND a.MTH_SKID =
b.MTH_SKID
AND a.PRMTD_CATEG_ID =
b.PRMTD_CATEG_ID
AND a.PRMTN_FACT_ID =
b.PRMTN_FACT_IDSince these two tables have DOP settings, the exection plan looks like:
| Id | Operation | Name | E-Rows | OMem | 1Mem | Used-Mem |
| 0 | CREATE TABLE STATEMENT | | | | | |
| 1 | LOAD AS SELECT | | | 256K| 256K| |
| 2 | PX COORDINATOR | | | | | |
| 3 | PX SEND QC (RANDOM) | :TQ10002 | 74M| | | |
| 4 | VIEW | VW_FOJ_0 | 74M| | | |
|* 5 | HASH JOIN FULL OUTER BUFFERED| | 74M| 1926M| 26M| |
| 6 | PX RECEIVE | | 12M| | | |
| 7 | PX SEND HASH | :TQ10000 | 12M| | | |
| 8 | PX BLOCK ITERATOR | | 12M| | | |
|* 9 | TABLE ACCESS FULL | PPPPPPPPPPP | 12M| | | |
| 10 | PX RECEIVE | | 74M| | | |
| 11 | PX SEND HASH | :TQ10001 | 74M| | | |
| 12 | PX BLOCK ITERATOR | | 74M| | | |
|* 13 | TABLE ACCESS FULL | OOOOOOOOOO | 74M| | | |
-----------------------------------------------------------------------------------------------------------I have noticed 8 slave sessions were up for this sql.(9 sessions totally of course)
With execution in parallel, the SQL still runs slowly. I want to know whether the parallel exectuion has some problem here.
Because after running several minutes, I saw four sessions became inactive and only 4 slave sessions were active.
Whether the workload was not distributed evenly or something else? Can I get some ideas on the direction of tuning this sql.
Best regards,
LeonLeon,
There is not much to tune about this SQL. There might be something to tune in your database configuration, so I'd move this question over to the Database General forum.
And while doing that, please be sure to include trace information and wait event information.
Regards,
Rob. -
Workflow error in fork step, process control, wait event
I am using fork step in workflow which has 2 parallel branches. In 1st branch i have a user decision step followed by a task for posting PO document in case of approval. In the 2nd branch of fork step I have a wait step to wait for an event followed by the same task for posting document with a process control step after that in the end to cancel the workitem(workitem generated by user decision step in the 1st branch of fork). I created the event by using a custom BOR object.
After the fork step is triggered, i have both a wait event running and workitem generated. When i raise the wait event from SWUE by entering the event, object key etc it works fine i.e., the workitem in the other branch is set of logically deleted and workflow ends.
But if the wait event is triggered from the program i.e., using FM SWW_WI_CREATE_VIA_EVENT, both get an error message in workflow log(SWIA). The message is: Error when executing the binding between work item 000000XXXXXX and flow item 000000XXXXXX where workitem number is the workitem id of the posting document task and flow item id is the workflow parent idhi,
message is self explanatory.
Activate the event trace SWELS, then do the event with SWUE and within your program (als please use SAP_WAPI function modules).
Now compare the 2 events in SWEL to see what the differences are .
Kind regards, Rob Dielemans
Maybe you are looking for
-
How do I stop getting text messages on my macbook air
How do I stop getting text messages on my MacBook Air?
-
Sales Order - item level to enter Revision of the Material
Hi, usually we enter Revision in the Batch field in our SO. This is possible becos we make the Revision number to be same as Batch number. Now I could not enter a line item in my SO becos the batch does not exists even though the Rev exists. For our
-
Value Based Hierarchy in OBI EE
Hello, In OBI SE we use both value-based and level-based hierarchies. But in EE I can't find an opportunity to use value based hierarchy. How to use value based hierarchy (parent-child) in OBI EE?
-
How can I add Vender Batch FIELD for Movement Type 511
Hi, guys, I tired to add a Vender Batch FIELD (LICHA) entry for Movement Type 511 through OMJJ/Field selection(Enjoy), but it's not allowed, is there any approach else to get it done? Thanks. Michael
-
How to make a Bi Bean Export to an excel sheet
Hi, I need to export the result of my data to an excel sheet , i need more export types, how can i extend the Exporter Bean or create another bean to do this ? Thanks...