码迷,mamicode.com
首页 > 数据库 > 详细

记一次insert因为db file sequential read影响性能导致性能原因的分析

时间:2017-11-11 11:38:51      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:client   include   blocks   详细   tin   导入   parse   obj   表空间   

通过详细的10046 trace发现,大量的io等待分布在以下数据文件上:
Misses in library cache during parse: 0
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net more data from client                  47        0.00          0.00
  db file sequential read                      1396        1.40         69.48
技术分享
通过查看发现其中file#=后面的文件号对应的数据文件分别为:
WAIT #3: nam=‘SQL*Net more data from client‘ ela= 97 driver id=675562835 #bytes=5 p3=0 obj#=-1 tim=2087739809552
WAIT #3: nam=‘db file sequential read‘ ela= 9787 file#=203 block#=65516 blocks=1 obj#=139501 tim=2087739819840
WAIT #3: nam=‘db file sequential read‘ ela= 29250 file#=88 block#=903826 blocks=1 obj#=139503 tim=2087739849887
WAIT #3: nam=‘db file sequential read‘ ela= 14184 file#=86 block#=262556 blocks=1 obj#=139503 tim=2087739864826
WAIT #3: nam=‘db file sequential read‘ ela= 62924 file#=89 block#=914843 blocks=1 obj#=139503 tim=2087739927918
WAIT #3: nam=‘db file sequential read‘ ela= 30286 file#=86 block#=788126 blocks=1 obj#=139505 tim=2087739959072
WAIT #3: nam=‘db file sequential read‘ ela= 12197 file#=85 block#=346836 blocks=1 obj#=139505 tim=2087739971677
WAIT #3: nam=‘db file sequential read‘ ela= 19443 file#=89 block#=825411 blocks=1 obj#=139505 tim=2087739991255
WAIT #3: nam=‘db file sequential read‘ ela= 73414 file#=89 block#=378855 blocks=1 obj#=139505 tim=2087740064903
WAIT #3: nam=‘db file sequential read‘ ela= 25007 file#=87 block#=279733 blocks=1 obj#=139505 tim=2087740090218
WAIT #3: nam=‘db file sequential read‘ ela= 34222 file#=86 block#=349231 blocks=1 obj#=139505 tim=2087740124718
WAIT #3: nam=‘db file sequential read‘ ela= 12976 file#=87 block#=639786 blocks=1 obj#=139505 tim=2087740137987
WAIT #3: nam=‘db file sequential read‘ ela= 42800 file#=87 block#=277869 blocks=1 obj#=139505 tim=2087740180951
WAIT #3: nam=‘db file sequential read‘ ela= 26248 file#=203 block#=39292 blocks=1 obj#=139505 tim=2087740207500
WAIT #3: nam=‘db file sequential read‘ ela= 16534 file#=88 block#=75324 blocks=1 obj#=139505 tim=2087740224369
WAIT #3: nam=‘db file sequential read‘ ela= 14318 file#=87 block#=276944 blocks=1 obj#=139505 tim=2087740238924
WAIT #3: nam=‘db file sequential read‘ ela= 10609 file#=15 block#=50567 blocks=1 obj#=139505 tim=2087740249666
WAIT #3: nam=‘db file sequential read‘ ela= 15451 file#=86 block#=349898 blocks=1 obj#=139505 tim=2087740265319
WAIT #3: nam=‘db file sequential read‘ ela= 41652 file#=89 block#=766147 blocks=1 obj#=139505 tim=2087740307199
WAIT #3: nam=‘db file sequential read‘ ela= 24658 file#=86 block#=352515 blocks=1 obj#=139505 tim=2087740332184
WAIT #3: nam=‘db file sequential read‘ ela= 18741 file#=87 block#=408687 blocks=1 obj#=139505 tim=2087740351201
WAIT #3: nam=‘db file sequential read‘ ela= 13814 file#=87 block#=213143 blocks=1 obj#=139505 tim=2087740365202
WAIT #3: nam=‘db file sequential read‘ ela= 19805 file#=85 block#=809539 blocks=1 obj#=139505 tim=2087740385174
WAIT #3: nam=‘db file sequential read‘ ela= 84448 file#=88 block#=648443 blocks=1 obj#=139505 tim=2087740469831
WAIT #3: nam=‘db file sequential read‘ ela= 19118 file#=14 block#=49758 blocks=1 obj#=139505 tim=2087740489121
WAIT #3: nam=‘db file sequential read‘ ela= 18210 file#=85 block#=260618 blocks=1 obj#=139505 tim=2087740507502
WAIT #3: nam=‘SQL*Net more data from client‘ ela= 50 driver id=675562835 #bytes=1 p3=0 obj#=139505 tim=2087740508284
WAIT #3: nam=‘db file sequential read‘ ela= 16073 file#=203 block#=65574 blocks=1 obj#=139501 tim=2087740524783
 
 
综上所属,通过详细的10046 trace中可以看到,在一条数据插入时会写入5到8个不同的数据文件,原因为oracle会在此表空间中寻找可用块,这些块不一定连续,因此硬盘寻道会话费大量的时间因此造成大量的db file sequential read等待事件。因此本月余下的几天会持续出现导入数据慢的问题,预计在下个月份使用新的表空间时问题会得到缓解。

记一次insert因为db file sequential read影响性能导致性能原因的分析

标签:client   include   blocks   详细   tin   导入   parse   obj   表空间   

原文地址:http://www.cnblogs.com/Clark-cloud-database/p/7818282.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!