为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:
【操作系统】:
【CPU】:
【问题描述】*:oracle迁移到dm之后,这个层次递归执行超级慢
select (select count(1)
from zc_xgwd d
where (d.dbh=k.sbbm
or dbh in (select dwbh
from gx_sys_dwb
connect by prior sjdw=dwbh
start with dwbh= k.sbbm))) sfscdzhyjy
from YS_YSBZB k
可以加这个HINT验证下:select /*+ CNNTB_OPT_FLAG(1) */ (select count(1)
from zc_xgwd d
where (d.dbh=k.sbbm
or dbh in (select dwbh
from gx_sys_dwb
connect by prior sjdw=dwbh
start with dwbh= k.sbbm))) sfscdzhyjy
from YS_YSBZB k
这个需要看看执行计划等这些去排查,只发一个SQL难度很大。