Primary Key

M

Moff

Hello,
My question is : How can I replace a primary key of type nvarchar width 65
by something smaller ou more rapid ? I'm using SQL server 2005 Express
edition in an Access 2007 project.
The structure is :
1 table "video" with the field video_name (primary key)
1 table "actor" with the field actor_name (primary key)
and to link the 2 tables (many-many relation) :
1 table "casting" with 2 fields casting_actor_name and casting_video_name.
These 2 fields are the primary key.
Thanks !
 
R

Rick Brandt

Moff said:
Hello,
My question is : How can I replace a primary key of type nvarchar
width 65 by something smaller ou more rapid ? I'm using SQL server
2005 Express edition in an Access 2007 project.
The structure is :
1 table "video" with the field video_name (primary key)
1 table "actor" with the field actor_name (primary key)
and to link the 2 tables (many-many relation) :
1 table "casting" with 2 fields casting_actor_name and
casting_video_name. These 2 fields are the primary key.
Thanks !

While smaller text fields and numeric fields result in more efficient
indexes than larger text fields it is unlikely that this would be "real
world" noticeable unless you are talking about very large tables.

The most obvious thing to try would be to add numeric surrogate key fields
and see if it makes an appreciable difference. I doubt that it will. It is
more likely that other design considerations are causing your perfromance
problems.
 
M

Moff

Hello Rick,
Is 3000 records considerated too much for a nvarchar 65 primary key used in
my 2 principal tables ?
I'm considering not using numeric primary key because I don't know if it is
easy to use and I'm a little bit misunderstooding the way it works.
Thanks
 
R

Rick Brandt

Moff said:
Hello Rick,
Is 3000 records considerated too much for a nvarchar 65 primary key
used in my 2 principal tables ?
I'm considering not using numeric primary key because I don't know if
it is easy to use and I'm a little bit misunderstooding the way it
works.
Thanks

3000 records is tiny by any standard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top