Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Logical data type
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00415925
Message ID:
00442162
Vues:
14
>>>What data-type do you use if you need if you need an index on that field?
>>
>>I forget the reason, but you do not index bit fields in SQL Server.
>
>The same reason you don't in VFP. Bit fields have only two possible values. Indexing on this field will result in the query optimizier using too many rows when determing a final result set.
>
>Example:
>Say you have an even distribution of 1s and 0s. An intermediate result will be built with approximately half of the rows in your table. This result set would then have to be matched with the results sets from the other selection criteria. If you took out the bit index, then the final result would be processed to determine what rows matched the bit flag.
>
>Just my opinion.

Does this also hold true with a bit field index with high selectivity? In other words, what happens with 1,000,000 records, and only 20 or 30 have a bit field = 1?
Chris McCandless
Red Sky Software
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform