存储过程很慢 ,如何处理?
#查看包的情况
select r.routineschema, r.routinename, r.routinemodulename, rd.bname as packagename from syscat.routines r, syscat.routinedep rd where r.specificname=rd.specificname and r.routineschema=rd.routineschema and rd.btype='K' and r.routineschema = 'DB2INST1' and r.routinename = 'SP_TEST'
把 SP_TEST 和 DB2INST1 换成你们的存储过程名和schema
#查看包的具体内容
db2expln -d <db_name> -c <schema> -p <package> -s 0 -t -output <output> -g
#收集运行的情况
db2pd -d dbname -apinfo
------------------------------------------------------------------------------------------
如果你觉得文章有用,欢迎打赏
标签:存储,routineschema,查看,rd,specificname,routinename,db2 From: https://www.cnblogs.com/z-cm/p/17132412.html