这是一个sql语句优化的过程。使用子查询与不使用子查询的效率对比

select sum(sl0000) from xstfxps2 where
  dhao00 in (
  select dhao00 from xstfxps1 where trunc(ywrq00)=trunc(sysdate)
  and khdm00='500000003913');
已用时间: 00: 02: 49.04

select sum(sl0000)
  from xstfxps2 a,(select dhao00 from xstfxps1 where trunc(ywrq00)=trunc(sysdate)
  and khdm00='500000003913') b
  where a.dhao00=b.dhao00;
已用时间: 00: 00: 03.05

相关文章:

  • 2021-05-20
  • 2021-07-22
  • 2021-09-24
猜你喜欢
  • 2022-12-23
  • 2021-12-05
  • 2022-02-09
  • 2021-06-18
  • 2021-05-31
  • 2021-08-15
  • 2022-12-23
相关资源
相似解决方案