_小黑_ 2022-09-23 18:13
浏览 18
已结题

sql server 子查询

select tsf.aa,
(
select distinct 1 from a,b,c
where a.id = tsf.id
        and b.cc = tsf.cc
        and c.cc = tsf.cc
)xx
from tsf
inner join tss on tss.id = tsf.id
where tss.s = 1
and tss.date > getdate() and tss.date < getdate()

将子查询xx 转换为left join 性能能否提升,想问一下,类似于这样的子查询,怎么编写sql 才能提升 查询性能

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 10月1日
    • 创建了问题 9月23日