BranchInfo 表索引设置
--表扫描,索引无效
SELECT * FROM dbo.BranchInfo WHERE LEN(PoiId)>0
--索引扫描
SELECT * FROM dbo.BranchInfo WHERE PoiId<>''
--索引扫描
SELECT * FROM dbo.BranchInfo WHERE PoiId IS NOT NULL AND PoiId<>''
--表扫描,索引无效
SELECT * FROM dbo.BranchInfo WHERE PoiId IS NULL OR PoiId=''
--索引扫描
SELECT * FROM dbo.BranchInfo WHERE ISNULL(PoiId,'')<>''
--表扫描,索引无效
SELECT * FROM dbo.BranchInfo WHERE PoiId IS NULL
UNION
--索引扫描
SELECT * FROM dbo.BranchInfo WHERE PoiId =''
SqlServer执行计划