I am working on an existing plsql program which processes 23million rows (month by month using cursor) and this program has multiple select statements and loads two tables(TABLE1 6 million records, other TABLE2 IS 17 million rows). Currently taking 50 hours. I have to use this plsql code.I am committing every 10,000 rows
I have altered table1 and table in nologging mode, dropped indexes on table1 and table2 before running.
1) once I execute alter table table1 nologging, is it guaranteed oracle is not logging in the behind?
2) awr report dba gave me for 1 hour of execution is like below. can someone guide me with problem areas I should be looking on this report.
Thanks
AWR Report
| DB Name | DB Id | Instance | Inst num | Release | RAC | Host |
|---|
| | | | | | |
| Snap Id | Snap Time | Sessions | Cursors/Session |
|---|
| Begin Snap: | 2574 | 02-May-14 15:16:33 | 81 | 10.2 |
| End Snap: | 2576 | 02-May-14 16:55:30 | 93 | 9.2 |
| Elapsed: | | 98.96 (mins) | | |
| DB Time: | | 556.09 (mins) | | |
Report Summary
Cache Sizes
| Begin | End | | |
|---|
| Buffer Cache: | 3,808M | 3,808M | Std Block Size: | 16K |
| Shared Pool Size: | 240M | 240M | Log Buffer: | 14,356K |
Load Profile
| Per Second | Per Transaction |
|---|
| Redo size: | 233,936.43 | 641,003.85 |
| Logical reads: | 35,794.52 | 98,079.73 |
| Block changes: | 1,463.33 | 4,009.63 |
| Physical reads: | 225.41 | 617.64 |
| Physical writes: | 33.56 | 91.97 |
| User calls: | 4.45 | 12.18 |
| Parses: | 195.46 | 535.57 |
| Hard parses: | 1.20 | 3.28 |
| Sorts: | 486.53 | 1,333.14 |
| Logons: | 0.12 | 0.33 |
| Executes: | 2,017.23 | 5,527.37 |
| Transactions: | 0.36 | |
| % Blocks changed per Read: | 4.09 | Recursive Call %: | 99.89 |
| Rollback per transaction %: | 0.00 | Rows per Sort: | 66.37 |
Instance Efficiency Percentages (Target 100%)
| Buffer Nowait %: | 100.00 | Redo NoWait %: | 100.00 |
| Buffer Hit %: | 99.38 | In-memory Sort %: | 100.00 |
| Library Hit %: | 99.72 | Soft Parse %: | 99.39 |
| Execute to Parse %: | 90.31 | Latch Hit %: | 100.00 |
| Parse CPU to Parse Elapsd %: | 81.38 | % Non-Parse CPU: | 98.55 |
Shared Pool Statistics
| Begin | End |
|---|
| Memory Usage %: | 74.69 | 74.34 |
| % SQL with executions>1: | 88.34 | 89.45 |
| % Memory for SQL w/exec>1: | 80.47 | 85.20 |
Top 5 Timed Events
| Event | Waits | Time(s) | Avg Wait(ms) | % Total Call Time | Wait Class |
|---|
| PX Deq Credit: send blkd | 17,008 | 27,347 | 1,608 | 82.0 | Other |
| db file sequential read | 1,024,985 | 3,658 | 4 | 11.0 | User I/O |
| CPU time | | 2,282 | | 6.8 | |
| db file scattered read | 23,207 | 92 | 4 | .3 | User I/O |
| log file parallel write | 4,584 | 56 | 12 | .2 | System I/O |
Main Report
Back to Top Wait Events Statistics
Back to TopTime Model Statistics
- Total time in database user-calls (DB Time): 33365.1s
- Statistics including the word "background" measure background process time, and so do not contribute to the DB time statistic
- Ordered by % or DB time desc, Statistic name
| Statistic Name | Time (s) | % of DB Time |
|---|
| sql execute elapsed time | 33,343.82 | 99.94 |
| DB CPU | 2,281.67 | 6.84 |
| PL/SQL execution elapsed time | 152.17 | 0.46 |
| sequence load elapsed time | 78.95 | 0.24 |
| parse time elapsed | 57.21 | 0.17 |
| hard parse elapsed time | 45.25 | 0.14 |
| hard parse (sharing criteria) elapsed time | 1.84 | 0.01 |
| PL/SQL compilation elapsed time | 1.78 | 0.01 |
| hard parse (bind mismatch) elapsed time | 1.71 | 0.01 |
| connection management call elapsed time | 0.70 | 0.00 |
| failed parse elapsed time | 0.56 | 0.00 |
| repeated bind elapsed time | 0.26 | 0.00 |
| DB time | 33,365.12 | |
| background elapsed time | 179.43 | |
| background cpu time | 17.53 | |
Back to Wait Events Statistics Back to TopWait Class
- s - second
- cs - centisecond - 100th of a second
- ms - millisecond - 1000th of a second
- us - microsecond - 1000000th of a second
- ordered by wait time desc, waits desc
| Wait Class | Waits | %Time -outs | Total Wait Time (s) | Avg wait (ms) | Waits /txn |
|---|
| Other | 18,583 | 74.78 | 27,348 | 1472 | 8.58 |
| User I/O | 1,063,733 | 0.00 | 3,753 | 4 | 490.88 |
| System I/O | 48,304 | 0.00 | 146 | 3 | 22.29 |
| Concurrency | 1,981 | 83.54 | 26 | 13 | 0.91 |
| Commit | 214 | 0.00 | 4 | 19 | 0.10 |
| Network | 53,102 | 0.00 | 2 | 0 | 24.50 |
| Configuration | 33 | 0.00 | 1 | 20 | 0.02 |
| Application | 148 | 0.00 | 0 | 0 | 0.07 |
Back to Wait Events Statistics Back to TopWait Events
- s - second
- cs - centisecond - 100th of a second
- ms - millisecond - 1000th of a second
- us - microsecond - 1000000th of a second
- ordered by wait time desc, waits desc (idle events last)
| Event | Waits | %Time -outs | Total Wait Time (s) | Avg wait (ms) | Waits /txn |
|---|
| PX Deq Credit: send blkd | 17,008 | 80.39 | 27,347 | 1608 | 7.85 |
| db file sequential read | 1,024,985 | 0.00 | 3,658 | 4 | 473.00 |
| db file scattered read | 23,207 | 0.00 | 92 | 4 | 10.71 |
| log file parallel write | 4,584 | 0.00 | 56 | 12 | 2.12 |
| db file parallel write | 28,497 | 0.00 | 41 | 1 | 13.15 |
| cursor: pin S wait on X | 1,664 | 99.46 | 26 | 15 | 0.77 |
| Log archive I/O | 1,352 | 0.00 | 24 | 18 | 0.62 |
| log file sequential read | 1,457 | 0.00 | 11 | 8 | 0.67 |
| control file parallel write | 3,743 | 0.00 | 7 | 2 | 1.73 |
| control file sequential read | 8,611 | 0.00 | 6 | 1 | 3.97 |
| log file sync | 214 | 0.00 | 4 | 19 | 0.10 |
| read by other session | 439 | 0.00 | 2 | 5 | 0.20 |
| SQL*Net more data to client | 34,427 | 0.00 | 2 | 0 | 15.89 |
| direct path read | 11,846 | 0.00 | 1 | 0 | 5.47 |
| log file switch completion | 31 | 0.00 | 1 | 21 | 0.01 |
| kksfbc child completion | 12 | 75.00 | 1 | 43 | 0.01 |
| direct path write | 3,256 | 0.00 | 0 | 0 | 1.50 |
| os thread startup | 60 | 0.00 | 0 | 3 | 0.03 |
| latch: shared pool | 144 | 0.00 | 0 | 0 | 0.07 |
| PX Deq: Signal ACK | 495 | 11.52 | 0 | 0 | 0.23 |
| log file single write | 60 | 0.00 | 0 | 1 | 0.03 |
| latch free | 228 | 0.00 | 0 | 0 | 0.11 |
| SQL*Net break/reset to client | 148 | 0.00 | 0 | 0 | 0.07 |
| SGA: allocation forcing component growth | 2 | 50.00 | 0 | 12 | 0.00 |
| SQL*Net message to client | 17,932 | 0.00 | 0 | 0 | 8.28 |
| rdbms ipc reply | 263 | 0.00 | 0 | 0 | 0.12 |
| latch: cache buffers chains | 37 | 0.00 | 0 | 0 | 0.02 |
| SQL*Net more data from client | 743 | 0.00 | 0 | 0 | 0.34 |
| LGWR wait for redo copy | 316 | 0.00 | 0 | 0 | 0.15 |
| latch: library cache | 12 | 0.00 | 0 | 0 | 0.01 |
| PX qref latch | 178 | 88.20 | 0 | 0 | 0.08 |
| latch: session allocation | 23 | 0.00 | 0 | 0 | 0.01 |
| latch: cache buffers lru chain | 10 | 0.00 | 0 | 0 | 0.00 |
| enq: PS - contention | 39 | 0.00 | 0 | 0 | 0.02 |
| latch: parallel query alloc buffer | 6 | 0.00 | 0 | 0 | 0.00 |
| buffer busy waits | 13 | 0.00 | 0 | 0 | 0.01 |
| latch: row cache objects | 9 | 0.00 | 0 | 0 | 0.00 |
| library cache load lock | 1 | 0.00 | 0 | 0 | 0.00 |
| library cache pin | 9 | 0.00 | 0 | 0 | 0.00 |
| latch: object queue header operation | 3 | 0.00 | 0 | 0 | 0.00 |
| cursor: mutex S | 24 | 0.00 | 0 | 0 | 0.01 |
| cursor: mutex X | 7 | 0.00 | 0 | 0 | 0.00 |
| undo segment extension | 2 | 0.00 | 0 | 0 | 0.00 |
| latch: library cache lock | 1 | 0.00 | 0 | 0 | 0.00 |
| SQL*Net message from client | 17,937 | 0.00 | 117,345 | 6542 | 8.28 |
| Streams AQ: waiting for messages in the queue | 11,105 | 99.79 | 35,600 | 3206 | 5.12 |
| PX Deq: Execution Msg | 25,399 | 62.60 | 31,912 | 1256 | 11.72 |
| PX Idle Wait | 11,510 | 96.36 | 22,288 | 1936 | 5.31 |
| Streams AQ: qmn slave idle wait | 2,972 | 0.00 | 11,871 | 3994 | 1.37 |
| Streams AQ: qmn coordinator idle wait | 3,329 | 43.77 | 5,936 | 1783 | 1.54 |
| pipe get | 10,147 | 11.99 | 5,931 | 585 | 4.68 |
| jobq slave wait | 2,019 | 93.56 | 5,920 | 2932 | 0.93 |
| virtual circuit status | 198 | 100.00 | 5,914 | 29868 | 0.09 |
| PX Deq Credit: need buffer | 2,796 | 69.31 | 3,875 | 1386 | 1.29 |
| Streams AQ: waiting for time management or cleanup tasks | 10 | 80.00 | 671 | 67119 | 0.00 |
| PX Deq: Table Q Normal | 87,889 | 0.31 | 633 | 7 | 40.56 |
| PX Deq: Execute Reply | 3,037 | 0.03 | 7 | 2 | 1.40 |
| PX Deq: Parse Reply | 191 | 0.00 | 2 | 9 | 0.09 |
| PX Deq: Msg Fragment | 708 | 0.00 | 0 | 0 | 0.33 |
| PX Deq: Join ACK | 323 | 0.00 | 0 | 0 | 0.15 |
| HS message to agent | 2 | 0.00 | 0 | 0 | 0.00 |
| class slave wait | 3 | 0.00 | 0 | 0 | 0.00 |
Back to Wait Events Statistics Back to TopBackground Wait Events
- ordered by wait time desc, waits desc (idle events last)
| Event | Waits | %Time -outs | Total Wait Time (s) | Avg wait (ms) | Waits /txn |
|---|
| log file parallel write | 4,585 | 0.00 | 56 | 12 | 2.12 |
| db file parallel write | 28,497 | 0.00 | 41 | 1 | 13.15 |
| Log archive I/O | 1,352 | 0.00 | 24 | 18 | 0.62 |
| log file sequential read | 1,457 | 0.00 | 11 | 8 | 0.67 |
| control file parallel write | 3,739 | 0.00 | 7 | 2 | 1.73 |
| control file sequential read | 7,602 | 0.00 | 5 | 1 | 3.51 |
| db file sequential read | 2,245 | 0.00 | 3 | 1 | 1.04 |
| direct path read | 11,844 | 0.00 | 1 | 0 | 5.47 |
| db file scattered read | 254 | 0.00 | 1 | 3 | 0.12 |
| direct path write | 3,234 | 0.00 | 0 | 0 | 1.49 |
| os thread startup | 22 | 0.00 | 0 | 4 | 0.01 |
| log file single write | 60 | 0.00 | 0 | 1 | 0.03 |
| events in waitclass Other | 619 | 0.00 | 0 | 0 | 0.29 |
| buffer busy waits | 5 | 0.00 | 0 | 0 | 0.00 |
| latch: row cache objects | 1 | 0.00 | 0 | 0 | 0.00 |
| latch: shared pool | 2 | 0.00 | 0 | 0 | 0.00 |
| rdbms ipc message | 24,258 | 78.97 | 61,304 | 2527 | 11.19 |
| Streams AQ: qmn slave idle wait | 2,972 | 0.00 | 11,871 | 3994 | 1.37 |
| Streams AQ: qmn coordinator idle wait | 3,329 | 43.77 | 5,936 | 1783 | 1.54 |
| pmon timer | 2,025 | 100.00 | 5,933 | 2930 | 0.93 |
| smon timer | 53 | 5.66 | 5,858 | 110526 | 0.02 |
| Streams AQ: waiting for time management or cleanup tasks | 10 | 80.00 | 671 | 67119 | 0.00 |
Back to Wait Events Statistics Back to TopOperating System Statistics
| Statistic | Total |
|---|
| AVG_BUSY_TIME | 62,623 |
| AVG_IDLE_TIME | 530,897 |
| AVG_SYS_TIME | 6,272 |
| AVG_USER_TIME | 56,211 |
| BUSY_TIME | 251,088 |
| IDLE_TIME | 2,124,196 |
| SYS_TIME | 25,685 |
| USER_TIME | 225,403 |
| RSRC_MGR_CPU_WAIT_TIME | 0 |
| VM_IN_BYTES | ############### |
| VM_OUT_BYTES | ############### |
| PHYSICAL_MEMORY_BYTES | 17,178,972,160 |
| NUM_CPUS | 4 |
| NUM_CPU_CORES | 4 |
Back to Wait Events Statistics Back to TopService Statistics
| Service Name | DB Time (s) | DB CPU (s) | Physical Reads | Logical Reads |
|---|
| awhdev.AMERISURE.INT | 33,267.90 | 2,258.30 | 1,294,233 | 210,772,659 |
| SYS$USERS | 48.90 | 21.30 | 26,587 | 1,030,196 |
| SYS$BACKGROUND | 0.00 | 0.00 | 17,332 | 698,395 |
| awhdevXDB | 0.00 | 0.00 | 0 | 0 |
Back to Wait Events Statistics Back to TopService Wait Class Stats
- Wait Class info for services in the Service Statistics section.
- Total Waits and Time Waited displayed for the following wait classes: User I/O, Concurrency, Administrative, Network
- Time Waited (Wt Time) in centisecond (100th of a second)
| Service Name | User I/O Total Wts | User I/O Wt Time | Concurcy Total Wts | Concurcy Wt Time | Admin Total Wts | Admin Wt Time | Network Total Wts | Network Wt Time |
|---|
| awhdev.AMERISURE.INT | 1036216 | 371916 | 1904 | 2585 | 0 | 0 | 48239 | 184 |
| SYS$USERS | 8359 | 2268 | 40 | 1 | 0 | 0 | 4376 | 1 |
| SYS$BACKGROUND | 19118 | 1068 | 34 | 9 | 0 | 0 | 0 | 0 |