Re: PK fields on a table
- From: "dan kirk" <dan_at_foxkeep.org>
- Date: Sat, 1 Aug 2009 22:39:14 -0400
The Primary Key is indexed to a Block Storage/Memory Address in a seperate (index) table, so the
actual order of fields doesn't matter. What does matter is the size of the Primary Key field(s),
the fewer bits, the smaller the 'index' table and the quicker specific record(s) can be located.
Having the PK field(s) as the first lines in a table aid the people who manage the tables. Anyone
that's worked creating data views will tell you they appreciate the ability to grasp the PK quickly
and easily by reading the first few lines of a table.
Dan Kirk
"Stephen Howe" <sjhoweATdialDOTpipexDOTcom> wrote in message
news:sdf975lf6ma81bshtb3i249do31pqbq7pl@xxxxxxxxxx
Hi
Just a general question:
Is it considered good design if a table is such that the PK fields are
the first fields on the table (and also that the fields are contiguous
and ordered the same way, such that they are not interspersed with
non-PK fields)
Does SQL Server benefit from this arrangement or the PK index?
Thanks
Stephen Howe
.
- References:
- PK fields on a table
- From: Stephen Howe
- PK fields on a table
- Prev by Date: Re: Computed field (easy question I think)
- Next by Date: INSERT SQL WITH ID = ID +1 (SQL 2005
- Previous by thread: Re: PK fields on a table
- Next by thread: Re: PK fields on a table
- Index(es):
Relevant Pages
|