Re: PK fields on a table

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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


.



Relevant Pages

  • Re: ODBC linked table - primary key
    ... guidance on WHY MS Access asks for a primary key on ODBC linked tables. ... read-only link. ... I'm contending that it shouldn't matter, ... This can make queries and filters misbehave. ...
    (microsoft.public.access.tablesdbdesign)
  • Too many args when running a stored procedure
    ... no matter how many i try to add, i thought i would try to insert the primary ... key only and work up from there but the primary key insert didnt work ... (@JobNumber) ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Identify selected row in the DataGrids underlying datatable...
    ... Forgot to mention that this a Windows App and that it doesn't really matter ... how I do this as long as I get the Primary key columnof the row that is ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Programmatically enumerate classes?
    ... any given class constitute the primary key. ... Strictly speaking, it's not absolutely ... Looks like it's just a matter of iterating over all the Properties, ...
    (microsoft.public.win32.programmer.wmi)
  • Re: What if there was no dark matter?
    ... Dark Matter is supposed to create gravity. ... matter would never seperate out. ...
    (talk.origins)