我有一个具有以下查询的程序,
Select
a.column
,count(distinct(c.column))
from `table1` a with (nolock)
inner join `table2` b with(`nolock`) on a.id=b.id
inner join `table3` c with (`nolock`) on charindex(c.colum,a.column)>0
group by
a.column
table1 有近 36,000 行,查询需要近 40 秒来加载结果集。
a.column 上安装了 fts 索引,它是 xml 数据类型。
我尝试拆分连接,但结果因分组而异。
如何重写此查询以使其更快?