Primary Key

  • Thread starter Thread starter Moff
  • Start date Start date
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 !
 
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.
 
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
 
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.
 
Back
Top