使用SQL Server

时间:2017-05-23 04:44:55

标签: indexing sql-server-2014 composite

我正在使用SQL Server 2014.我有以下查询,我想加快,但不知道如何:

select a.*
from tableA a
left join tableB b on a.Datevalue between b.YearFrom and b.YearTo 
                   and  a.IPnumber between b.BeginNum and b.EndNum

此外,tableB有5000万行(数据空间为4,200 MB)。 tableA有1,200行。

此查询通常需要大约半小时。

0 个答案:

没有答案
相关问题