oracle执行drop慢,在线急等:drop table 非常慢 - Oracle数据库管理 - Oracle数据库数据恢复、性能优化来问问AskMaclean - ParnassusData诗檀...

在AIX系统上,使用Oracle 10.2.0.4执行DROP TABLE操作时,发现该操作耗时约5秒。通过10046 trace文件分析,发现涉及复杂的查询计划,包括多次表和索引的访问。问题可能源于查询优化器的选择,建议检查数据库设置并考虑使用成本基优化器(CBO)代替规则基优化器(RBO)。
摘要由CSDN通过智能技术生成

aix

oracle 10.2.0.4

drop一张表大概需要5s左右

生成10046trace文件的问题sql

PARSING IN CURSOR #6 len=577 dep=1 uid=0 oct=3 lid=0 tim=39332565415208 hv=3360872067 ad='aaf1cad8'

select u2.name, o2.name from ind$ i, obj$ o1, obj$ o2,    user$ u1, user$ u2 where    i.bo# = o1.obj# and o1.owner#=u1.user# and i.obj#=o2.obj#    and o2.owner#=u2.user# and u1.name=:1 and o1.name=:2 and i.type#=9   union    select u4.name, o4.name from ind$ i1, ntab$ n, obj$ o3, obj$ o4,    user$ u3, user$ u4 where i1.bo#=n.ntab# and    n.ntab# in (select n1.ntab# from ntab$ n1 start with n1.obj#=o3.obj#                connect by prior n1.ntab# = n1.obj#)    and o3.owner#=u3.user# and i1.obj#=o4.obj#    and o4.owner#=u4.user# and u3.name=:1 and o3.name=:2 and i1.type#=9

END OF STMT

PARSE #6:c=0,e=2477,p=0,cr=0,cu=0,mis=1,r=0,dep=1,og=4,tim=39332565415206

EXEC #6:c=0,e=3079,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,tim=39332565418352

FETCH #6:c=4840000,e=7178892,p=0,cr=929355,cu=0,mis=0,r=0,dep=1,og=4,tim=39332572597290

STAT #6 id=1 cnt=0 pid=0 pos=1 obj=0 op='SORT UNIQUE (cr=929355 pr=0 pw=0 time=7178902 us)'

STAT #6 id=2 cnt=0 pid=1 pos=1 obj=0 op='UNION-ALL  (cr=929355 pr=0 pw=0 time=7178883 us)'

省略。。。

执行计划如下:

PLAN_TABLE_OUTPUT

1        SQL_ID 7ayfw9g455pn3

2        --------------------

3        select u2.name, o2.name from ind$ i, obj$ o1, obj$ o2,    user$ u1,

4        user$ u2 where    i.bo# = o1.obj# and o1.owner#=u1.user# and

5        i.obj#=o2.obj#    and o2.owner#=u2.user# and u1.name=:1 and o1.name=:2

6        and i.type#=9   union    select u4.name, o4.name from ind$ i1, ntab$ n,

7        obj$ o3, obj$ o4,    user$ u3, user$ u4 where i1.bo#=n.ntab# and

8        n.ntab# in (select n1.ntab# from ntab$ n1 start with n1.obj#=o3.obj#

9                    connect by prior n1.ntab

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值