Information générale
Forum:
Microsoft SQL Server
Versions des environnements
SQL Server:
SQL Server 2014
Network:
Windows Server 2012
>>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"
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement