oracle连接查询用了去重复语句数导致卡死?
发布网友
发布时间:2022-04-14 04:17
我来回答
共2个回答
热心网友
时间:2022-04-14 05:47
注释部分继续不要
left join MM_POLICY_TD x4
改成
left join
( select T1.POLICYNO
from
MM_POLICY_TD T1,
(SELECT MAX(SEQPOLICY) MAX_SEQPOLICY FROM MM_POLICY_TD) T2
where T1.SEQPOLICY=T2. MAX_SEQPOLICY
) x4
或改成:
left join
( select POLICYNO
from
MM_POLICY_TD
order by SEQPOLICY desc
where rowNum=1
) x4
不知道这样行不?
要是不行,将这些关联字段加上索引,特别是MM_POLICY_TD表的 SEQPOLICY字段