阅读背景:

SQL Server - 计算列的索引?

来源:互联网 

I'm joining to a table dozens of different times, and every time, I join (or filter) based on the results of a SUBSTRING of one of the columns (it's a string, but left-padded with zeros, and I don't care about the last four digits). As a result, even though this column is indexed and my query would use the index, it does a table scan because the SUBSTRING itself isn't indexed, so SQL Server has to calculate it for every row before as it's joining.I'm joining to a table dozens of different time




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: