为什么逻辑读取因为where子句中的IS NULL而高?

时间:2015-06-26 04:30:14

标签: sql-server-2008-r2

如何减少以下存储过程的逻辑读取?

存储过程

SELECT 
column1,column2,...
FROM myview as v
WHERE (v.LanguageId IN (1) OR v.LanguageId IS NULL)      
AND OrganisationId IN (1,2,3)  
AND (v.ETypeLanguageId IN (1) OR v.ETypeLanguageId IS NULL)  
AND (v.GTypeLanguageId IN (1) OR v.GTypeLanguageId IS NULL)  
AND v.TargetTypeId IN (2) ORDER BY column1,column2
OPTION (RECOMPILE)

最诚挚的问候,

0 个答案:

没有答案