Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Column type for faster Where
Message
De
09/03/2018 10:58:27
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
01658642
Message ID:
01658643
Vues:
37
>Sorry for so many questions this morning. I found a "bottleneck" in my app (not super critical but I need to find a way to deal with it).
>
>If I am to add a column that will have two values, False and True, and build an index on this column, would the column type BIT be the best? In terms of including this column in the WHERE clause? Logically, I think, Bit would be the best, 0 and 1. But there could be a case of making this column Char(1) and storing '0' or '1'.
>Which one would give me better performance (speed) in SQL Select?

For logical values, I always use Bit. I have found this to work very well with indexing.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform