Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

necessary index

Status
Not open for further replies.

jepatte

Programmer
Jul 4, 2005
75
US
What is the rule of thumb for creating an index on a Y/N column. I have a table with 15 char(1) fields with the possible value of Y or N.

My table has 2.5 million records. I need the ability to filter by any of these columns either by Y or N and sometimes other criteria regarding other fields.

Is it overkill to index each one of these or not?
 
Generally speaking, the fewer the unique values, the less need there is for an index on that field. In most cases, it is counterproductive.

Look up "indexes, tuning" in Books Online.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
A virtual machine ate my accounting data. I transferred it to a physical box, then I beat it to smithereens with a sledgehammer. I feel better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top