Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WHERE IN approach
Message
De
28/02/2017 10:04:23
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2014
OS:
Windows 8.1
Network:
Windows Server 2012
Divers
Thread ID:
01648591
Message ID:
01648617
Vues:
22
>If the Performance in practice is not different I would prefer IN(1,2) for two reasons:
>- It is more readable (WHERE MyField IN (1,3,5,7,9,11,13,15)
>- It does not need additional parentheses if there are other expressions in the where clause

Yes, it is certainly more readable and shorter. I just do not like this additional hop in the execution plan which removes some performance percentage from the main index key.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform