General information
Forum:
Microsoft SQL Server
>In many cases, it is worthless to have an index on a 2-values field. Say you have 1,000,000 rows and that 40% are 0 and 60% are 1 what will be the added value of this index? More time will be lost going from the index pages to real data pages then a table scan will take.
Eric, this is not related with the bit 0,1 values but with the index selectivity
of a value or values when I want.
If 1% of the rows have 1 and on 90% of the cases I want only the 1's rows,
the index is unquestionably useful.
Of course i don't say that for every field a index is useful,
but Jim reported that on these articles is written a absolute rule.
Fabio
>
>>>Because this flag is only has two value (0,1). I read some articles. They said in this case. Index is not very useful.
>>>
>>>
>>>Thanks
>>
>>If this is written, then it is better not to read these articles.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only