Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Creating a Primary Key column in SQL Server 2005

Author  Topic 

shankarnraj
Starting Member

3 Posts

Posted - 2008-02-01 : 12:09:55
I have a varchar column in a table, which is an unique key column. Now when I design this table should I use this column as a primary key or should I add one more Integer column as a primary key column for the performance?

One more point is, when ever I do a search on this table I will search based on that unique varchar column values only, so even then if I add new integer column just for Primary key I will not use this column for searching values.

With these information, can some body help me in deciding this?

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-01 : 23:38:10
What's size of that column? Either way, you need index on that column.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2008-02-04 : 14:34:50
The decision as to your index is dependant on the type of search .

Jack Vamvas
--------------------
Search IT jobs from multiple sources- http://www.ITjobfeed.com
Go to Top of Page
   

- Advertisement -