August 24, 2010 at 1:45 pm
What kind of index do I create on social security column?
Thanks.
August 24, 2010 at 2:13 pm
sunny.tjk (8/24/2010)
What kind of index do I create on social security column?
Clustered/Non-Clustered
For sure it will be a non-clustered one.
Unique/NonUnique
In general I wouldn't expect to get duplicates on SSN... but, you may find yourself with legit duplicate values in at least two different scenarios:
1- if target table is a Slowly Changing Dimension of the Type II and,
2- if table will hold data describing people from more than one country.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.August 25, 2010 at 1:20 pm
And, to a large degree, it depends on the other data that is being retrieved by the query. Do you need INCLUDE columns? Should the SSN be part of a compound key? Hard to say without knowing how it will be used.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
August 25, 2010 at 2:21 pm
I would prefer NC Index
SB.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply