點擊上方“IT那活兒”公眾號,關注后了解更多內容,不管IT什么活兒,干就完了!!!
事件描述
INST_ID EVENT# EVENT WAIT_CLASS COUNT(*)
---------- ---------- ---------------------------------------- --------------- ----------
1 447 SQL*Net message from dblink Network 2
2 172 log file sync Commit 2
2 161 log file parallel write System I/O 1
2 186 gc current request Cluster 1
2 860 Redo Transport MISC Other 1
3 447 SQL*Net message from dblink Network 1
5 246 direct path read User I/O 131
5 183 db file async I/O submit System I/O 13
5 179 db file sequential read User I/O 10
5 184 db file parallel read User I/O 8
5 172 log file sync Commit 8
5 182 db file parallel write System I/O 7
5 860 Redo Transport MISC Other 1
5 447 SQL*Net message from dblink Network 1
5 848 SYNC Remote Write Other 1
Start - End 5_R 5_W 5_T
-------------------------- -------- ----------- -------
07/28 06:30 - 07/28 07:00 59.29 3.90 0.45
07/28 07:00 - 07/28 07:30 4.97 2.64 0.55
07/28 07:30 - 07/28 08:00 64.17 107.45 0.66
07/28 08:00 - 07/28 08:30 49.35 119.04 0.49
07/28 08:30 - 07/28 09:00 1,410.74 61.31 7.11
分析過程
Top Event Waits Total Wait Time (sec) Wait Avg(ms) % DB time Wait Class
--- ---------------------------------------- ------------ --------------------- ---------------- --------- --------------
1 direct path read 799,755 60,444.8 75.579 19.2 User I/O
2 log file sync 16,373,135 30,794.3 1.881 9.8 Commit
3 log file switch (checkpoint incomplete) 4,761 12,784.5 2,685.246 4.1 Configuration
4 db file sequential read 107,176 6,753.6 63.014 2.1 User I/O
5 DB CPU 5,841.9 1.9
6 db file parallel read 23,852 4,916.0 206.103 1.6 User I/O
7 buffer busy waits 29,536 2,097.8 71.024 0.7 Concurrency
8 log file switch completion 1,906 1,488.0 780.686 0.5 Configuration
9 row cache lock 320,632 1,111.9 3.468 0.4 Concurrency
10 read by other session 105 220.0 2,095.040 0.1 User I/O
Top Elapsed Time (s) Executions Elapsed Time per Exec (ms) Total% SQL_ID Schema Module
--- ---------------- ------------ -------------------------- ------- ------------- ------ --------------------------
1 122,861.29 20 6,143,064.500 38.94 dwyq6uy86w4gw AD MrOfeJ@mafjnh-10.lacolavon
2 122,580.44 22 5,571,838.182 38.85 1gxak4kjy0tj6 AD MrOfeJ@mafjnh-10.lacolavon
3 1,949.11 6,674 292.045 0.62 9kuw4fh61x8sj AD MrOfeJ@mafjnh-15.lacolavon
4 1,907.77 1 1,907,770.000 0.60 dmyv32kv2v407 AD MrOfeJ@mafjnh-10.lacolavon
5 1,784.75 1 1,784,750.000 0.57 55a3n59n7duy0 AD MrOfeJ@mafjnh-10.lacolavon
Top CPU Time (s) Executions CPU per Exec (ms) Total% Elapsed Time (s) SQL_ID Schema Module
--- ------------- ------------ ----------------- ------- ---------------- ------------- ------ ----------------------------
1 324.08 22 14,731.11 5.55 122,580.44 1gxak4kjy0tj6 AD MrOfeJ@mafjnh-10.lacolavon
2 314.10 20 15,704.77 5.38 122,861.29 dwyq6uy86w4gw AD MrOfeJ@mafjnh-10.lacolavon
3 76.83 320,633 0.24 1.32 1,352.41 bsy2r0brwxdba AD emarfs-167924-1@hnjfapp55-3
4 43.22 31 1,394.24 0.74 42.78 gx4drnh6540u5 JF SQL*Plus
5 33.33 1,046,074 0.03 0.57 508.34 9vaj2dfcrc44v AD emarfs-175368-13@hnjfapp17-7
Top User I/O Time (s) Executions UIO per Exec (ms) %Total Elapsed Time (s) SQL_ID Schema Module
--- ----------------- ------------ ----------------- ------- ---------------- ------------- ------ --------------------------
1 31546.74 22 1,433,942.7927 43.46 122,580.44 1gxak4kjy0tj6 AD MrOfeJ@mafjnh-10.lacolavon
2 29609.35 20 1,480,467.5470 40.79 122,861.29 dwyq6uy86w4gw AD MrOfeJ@mafjnh-10.lacolavon
3 1939.27 6,674 290.5711 2.67 1,949.11 9kuw4fh61x8sj AD MrOfeJ@mafjnh-15.lacolavon
4 1194.62 6,937 172.2093 1.65 1,231.32 d5zu2b9cz25y8 AD MrOfeJ@mafjnh-15.lacolavon
5 1032.22 3,548 290.9299 1.42 1,065.47 c9tkyagwbvj7d AD MrOfeJ@mafjnh-15.lacolavon
Top Buffer Gets Executions Gets per Exec %Total Elapsed Time (s) SQL_ID Schema Module
--- ----------- ---------- --------------- ------- ---------------- ------------- ------ -----------------------------
1 104,089,687 22 4,731,349.41 25.86 122,580.44 1gxak4kjy0tj6 AD MrOfeJ@mafjnh-10.lacolavon
2 98,475,484 20 4,923,774.20 24.46 122,861.29 dwyq6uy86w4gw AD MrOfeJ@mafjnh-10.lacolavon
3 6,555,975 31 211,483.06 1.63 42.78 gx4drnh6540u5 JF SQL*Plus
4 2,800,644 1,046,074 2.68 0.70 508.34 9vaj2dfcrc44v AD emarfs-175368-13@hnjfapp17-7
5 2,599,250 1,010,897 2.57 0.65 350.97 4wjx4ubwbumz5 AD emarfs-175388-5@hnjfapp33-13
Top Physical Reads Executions Reads per Exec %Total Elapsed Time (s) SQL_ID Schema Module
--- -------------- ------------ --------------- ------- ---------------- ------------- ------ --------------------------
1 103,598,396 22 4,709,018.00 52.23 122,580.44 1gxak4kjy0tj6 AD MrOfeJ@mafjnh-10.lacolavon
2 98,039,336 20 4,901,966.80 49.43 122,861.29 dwyq6uy86w4gw AD MrOfeJ@mafjnh-10.lacolavon
3 1,341,265 1 1,341,265.00 0.68 1,784.75 55a3n59n7duy0 AD MrOfeJ@mafjnh-10.lacolavon
4 1,341,265 1 1,341,265.00 0.68 1,907.77 dmyv32kv2v407 AD MrOfeJ@mafjnh-10.lacolavon
5 29,556 6,674 4.43 0.01 1,949.11 9kuw4fh61x8sj AD MrOfeJ@mafjnh-15.lacolavon
-- dwyq6uy86w4gw
update CD.OC_DORP_173 set PROD_EXPIRE_DATE = :1 where PRODUCT_ID=:2
-- 1gxak4kjy0tj6
select t.* from CD.OC_DORP_173 t where t.PRODUCT_ID=:1
SQL_ID dwyq6uy86w4gw, child number 0
-------------------------------------
update CD.OC_DORP_173 set PROD_EXPIRE_DATE = :1 where PRODUCT_ID=:2
Plan hash value: 2749196760
------------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
------------------------------------------------------------------------------------------------------------------
| 0 | UPDATE STATEMENT | | | | 817K(100)| | | | |
| 1 | UPDATE | OC_DORP_173 | | | | | | | |
| 2 | PX COORDINATOR | | | | | | | | |
| 3 | PX SEND QC (RANDOM)| :TQ10000 | 1 | 18 | 817K (1)| 00:00:32 | Q1,00 | P->S | QC (RAND) |
| 4 | PX BLOCK ITERATOR | | 1 | 18 | 817K (1)| 00:00:32 | Q1,00 | PCWC | |
|* 5 | TABLE ACCESS FULL| OC_DORP_173 | 1 | 18 | 817K (1)| 00:00:32 | Q1,00 | PCWP | |
------------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
5 - access(:Z>=:Z AND :Z<=:Z)
filter("PRODUCT_ID"=:2)
SQL_ID 1gxak4kjy0tj6, child number 0
-------------------------------------
select t.* from CD.OC_DORP_173 t where t.PRODUCT_ID=:1
Plan hash value: 3713006496
-----------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
-----------------------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 32424 (100)| | | | |
| 1 | PX COORDINATOR | | | | | | | | |
| 2 | PX SEND QC (RANDOM)| :TQ10000 | 1 | 119 | 32424 (1)| 00:00:02 | Q1,00 | P->S | QC (RAND) |
| 3 | PX BLOCK ITERATOR | | 1 | 119 | 32424 (1)| 00:00:02 | Q1,00 | PCWC | |
|* 4 | TABLE ACCESS FULL| OC_DORP_173 | 1 | 119 | 32424 (1)| 00:00:02 | Q1,00 | PCWP | |
-----------------------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
4 - access(:Z>=:Z AND :Z<=:Z)
filter("T"."PRODUCT_ID"=:1)
TABLE_NAME COLUMN_NAME COLUMN_POSITION INDEX_NAME UNIQUENES STATUS
------------ ----------- --------------- ------------------- --------- ------
OC_DORP_173 OBJECT_ID 1 PK_OC_DORP_173 UNIQUE VALID
OC_DORP_173 PRODUCT_ID 2 PK_OC_DORP_173 UNIQUE VALID
OC_DORP_173 VALID_DATE 3 PK_OC_DORP_173 UNIQUE VALID
OC_DORP_173 SO_NBR 4 PK_OC_DORP_173 UNIQUE VALID
COLUMN_NAME DATA_TYPE NUM_DISTINCT DENSITY
--------------------- ---------- ------------ ----------
PRODUCT_ID NUMBER 266993664 3.7454E-09
COUNT(1)
-------------
271,868,287
SEGMENT_NAME MB
-------------- ----------
OC_DORP_173 36,844.00
TABLE_NAME PARTITIONED
--------------- ------------
OC_DORP_173 NO
分析結論及建議
優化建議:
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/129145.html
摘要:正是存在問題,促使我們考慮引入數據庫審核平臺。的確,與很多互聯網公司相比,數據庫數十套的估摸并不是太大但與互聯網類公司不同,類似宜信這類金融類公司對數據庫的依賴性更大,大量的應用是重數據庫類的,且其使用復雜程度也遠比互聯網類的復雜。 作者:韓鋒 出處:DBAplus社群分享 Themis開源地址:https://github.com/CreditEaseDBA 拓展閱讀:宜信開源|數...
摘要:實際應用中,查詢的返回結果會有條記錄。修改保存文件后,重啟服務。通常優化至少到級別,最好能優化到指出使用哪個索引在該表找到行記錄。如果該值為,說明沒有使用索引,可以建立索引提高性能顯示實際使用的索引。 ...
閱讀 1346·2023-01-11 13:20
閱讀 1684·2023-01-11 13:20
閱讀 1132·2023-01-11 13:20
閱讀 1858·2023-01-11 13:20
閱讀 4100·2023-01-11 13:20
閱讀 2704·2023-01-11 13:20
閱讀 1385·2023-01-11 13:20
閱讀 3597·2023-01-11 13:20