by赵工:我oracle 调用外部 dll 程序 程序里就一个空的方法 啥也没操作 耗时4秒多 下面是我 10046 跟踪的日志 哪位大神能帮忙分析下 可能是什么原因导致的吗 在一个新装的测试库上速度很快 毫秒级
yyb:=====================
PARSING IN CURSOR #373811820 len=39 dep=0 uid=84 oct=47 lid=84 tim=26870611116 hv=2178639128 ad='b1f16fdc' sqlid='6yzqp7a0xqt8s'
begin
PKG_YY_OCI.OCIMSG('1234');
end;
END OF STMT
PARSE #373811820:c=15600,e=1917,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=26870611114
*** 2019-01-30 16:26:24.546
WAIT #373811820: nam='External Procedure initial connection' ela= 2243850 p1=0 p2=0 p3=0 obj#=-1 tim=26872855286
WAIT #373811820: nam='HS message to agent' ela= 63 p1=0 p2=0 p3=0 obj#=-1 tim=26872855561
*** 2019-01-30 16:26:26.628
WAIT #373811820: nam='HS message to agent' ela= 2080597 p1=0 p2=0 p3=0 obj#=-1 tim=26874936489
WAIT #373811820: nam='HS message to agent' ela= 27 p1=0 p2=0 p3=0 obj#=-1 tim=26874936651
WAIT #373811820: nam='External Procedure call' ela= 478 p1=0 p2=0 p3=0 obj#=-1 tim=26874936719
EXEC #373811820:c=0,e=4325582,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=26874936841
WAIT #373811820: nam='SQL*Net message to client' ela= 2 driver id=1413697536 #bytes=1 p3=0 obj#=-1 tim=26874936976
WAIT #373811820: nam='SQL*Net message from client' ela= 7724 driver id=1413697536 #bytes=1 p3=0 obj#=-1 tim=26874944745
CLOSE #373811820:c=0,e=43,dep=0,type=0,tim=26874944942
abc:=====================
PARSING IN CURSOR #3 len=43 dep=0 uid=128 oct=47 lid=128 tim=400731180430 hv=2681211119 ad='93172434' sqlid='5y9297ugx027g'
begin
PKG_YY_OCI1.OCIMSG('1234');
end;
END OF STMT
PARSE #3:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=0,tim=400731180430
WAIT #3: nam='HS message to agent' ela= 77 p1=0 p2=0 p3=0 obj#=-1 tim=400731240253
WAIT #3: nam='HS message to agent' ela= 24151 p1=0 p2=0 p3=0 obj#=-1 tim=400731264559
WAIT #3: nam='HS message to agent' ela= 7 p1=0 p2=0 p3=0 obj#=-1 tim=400731264616
EXEC #3:c=0,e=82364,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=0,tim=400731262794
WAIT #3: nam='SQL*Net message to client' ela= 0 driver id=1413697536 #bytes=1 p3=0 obj#=-1 tim=400731264705
WAIT #3: nam='SQL*Net message from client' ela= 7816 driver id=1413697536 #bytes=1 p3=0 obj#=-1 tim=400731272537
CLOSE #3:c=0,e=0,dep=0,type=1,tim=400731262794
yyb上解析mis一次,再就是External Procedure initial connection和HS message to agent各等待2s
请提供下两边环境的sqlnet.ora、listener.ora的配置,另外最好找和yyb同版本的数据库11.2.0.3进行测试。