qq_21168141 2015-09-11 01:58 采纳率: 0%
浏览 2267

同样的sql只有查询的日期不同但执行速度相差很多

SELECT message,status,receivername,main.registno,sendername,to_char(send_time) as send_time,mobile,riskcode
from prplflsmssend ps left join prplflsmslog pl on pl.smssendid=ps.id, prplflmaininfo main
where trim(smstype)<>'' and pl.registno = main.registno and smstype='35'
and exists ( select pdrc.comCode from PrpDcompany pdrc where ( pdrc.upperPath like '00000000,42000000,42010000%' ) and main.comcode = pdrc.comCode )

and operatedate between to_date('2015-09-04 00:00:00') and to_date('2015-09-04 23:59:59') ; --执行速度 大约30分钟

select message,status,receivername,main.registno,sendername,to_char(send_time) as send_time,mobile,riskcode
from prplflsmssend ps left join prplflsmslog pl on pl.smssendid=ps.id, prplflmaininfo main
where trim(smstype)<>'' and pl.registno = main.registno and smstype='18'
and exists ( select pdrc.comCode from PrpDcompany pdrc where ( pdrc.upperPath like '00000000,42000000,42010000%' ) and main.comcode = pdrc.comCode )

and operatedate >= to_date('2015-09-09 00:00:00') and operatedate<= to_date('2015-09-09 23:59:59') 执行速度 几秒钟

  • 写回答

4条回答 默认 最新

  • oxcow 2015-09-11 02:00
    关注

    执行查询计划,看慢到哪里了!

    评论

报告相同问题?

悬赏问题

  • ¥15 运筹学排序问题的应用
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办