By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,364 Members | 1,341 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,364 IT Pros & Developers. It's quick & easy.

Plannig indexing

P: 5
Dear all.
I am designing the database for SQL server 2005 . I have problem in planning index.
In one part I have personal table. I donít need quarry by personal ID any time but I create clustered index in personal ID by add primary key constraint .
I decide have to clustered index constraint in other column for example last name or SSN and add none clustered index for primary key.
I need some Idea about this.
Thank you , Saeid.
Jun 11 '08 #1
Share this Question
Share on Google+
4 Replies


10K+
P: 13,264
...I donít need quarry by personal ID any time but I create clustered index in personal ID by add primary key constraint .
...
Are you sure about this? Don't you have personalID appearing as a foreign key in other tables?
Jun 11 '08 #2

P: 5
i use PersonalID for foreign key but for this propose I can add non clustered index .
By this work sort data in table in insert time and increase quarry performance.
it is right?
Jun 11 '08 #3

10K+
P: 13,264
i use PersonalID for foreign key but for this propose I can add non clustered index .
By this work sort data in table in insert time and increase quarry performance.
it is right?
Not sure I understand what you are trying to say but I think this article should be able to help you more.
Jun 11 '08 #4

ck9663
Expert 2.5K+
P: 2,878
Indexing,makes accessing tables faster, that's a general rule.

If the table will only have one index, make it clustered.

Create a clustered index for your primary key and create non-clustered for those columns frequently use in WHERE conditions on your query. Though re-indexing is a 3GL thing, (dbase, foxpro, foxbase) it wouldn't hurt to do a index maintenance whenever your data increases by at least 10-15%.

-- CK
Jun 12 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.