Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WHERE IN approach
Message
From
28/02/2017 14:07:06
 
 
To
28/02/2017 13:26:17
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2014
OS:
Windows 8.1
Network:
Windows Server 2012
Miscellaneous
Thread ID:
01648591
Message ID:
01648633
Views:
25
>>I realize that the original probably was ONLY example data. But the very first thought (guessing that NoProvince is intX typed) for optimization would be "Between" or the equivalent ">= and <=" query syntax to skip the problem Fabio mentioned ;-)
>
>Yes, we are talking about field of type integer.

So I am pretty certain that for contiuos ranges "Between" or the equivalent >= and <= in where clause should be faster, as only the range of the index needs to be checked, or to say it in Fabios words in this special case "and" can be used instead of "or"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform