暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

应用批量插入速度慢且应用端有卡顿现象

原创 问题归档 2019-05-09
497

问题描述

应用批量插数据到表,总插4万条,每1000条提交,但是会出现卡的情况,对应的的等待事件是sql net more data from client?表子段比较多。这个能判断为是网络原因吗?

专家解答

从10046trace文件来看,你的问题在于写日志太慢了:

EXEC #2:c=0,e=663,p=0,cr=1,cu=7,mis=0,r=1,dep=0,og=1,plh=0,tim=199411454697382

WAIT #2: nam='SQL*Net message to client' ela= 0 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=199411454697415

WAIT #2: nam='SQL*Net message from client' ela= 601 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=199411454698035

CLOSE #2:c=0,e=4,dep=0,type=3,tim=199411454698057

XCTEND rlbk=0, rd_only=0, tim=199411454698079

WAIT #0: nam='log file sync' ela= 4302 buffer#=10993 sync scn=1469605365 p3=0 obj#=-1 tim=199411454702426

WAIT #0: nam='SQL*Net message to client' ela= 1 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=199411454702453

WAIT #0: nam='SQL*Net message from client' ela= 568 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=199411454703034

XCTEND rlbk=1, rd_only=1, tim=199411454703053

WAIT #0: nam='SQL*Net message to client' ela= 0 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=199411454703082

WAIT #0: nam='SQL*Net message from client' ela= 816 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=199411454703912


log file sync 的时间最长,可能是存储太慢,有性能瓶颈。

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论