Re: why default index for primary key is clustered?
From: Joe Celko (jcelko212_at_earthlink.net)
Date: 08/18/04
- Next message: Adam Machanic: "Re: why default index for primary key is clustered?"
- Previous message: Erik Grob: "Re: Convert GUID to 10-12 digit char?"
- In reply to: Zeng: "why default index for primary key is clustered?"
- Next in thread: Adam Machanic: "Re: why default index for primary key is clustered?"
- Reply: Adam Machanic: "Re: why default index for primary key is clustered?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 17 Aug 2004 19:08:46 -0700
>> So why SQL Server created clustered index by default for primary key
which is always unique? It seems to be a bad default design .. <<
History, not logic. When you had sequential tape files, you had to sort
them on the record keys. A master tape would be read in sorted order
against a transaction tape in that same order. All data processing was
based on merging these tapes back them.
So when we got disk and random access, we kept the old model! The
underlying file structure in SQL Server is still physically contigous
storage records, and tables based on separate files. This is not true
in newer SQL engines.
--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Adam Machanic: "Re: why default index for primary key is clustered?"
- Previous message: Erik Grob: "Re: Convert GUID to 10-12 digit char?"
- In reply to: Zeng: "why default index for primary key is clustered?"
- Next in thread: Adam Machanic: "Re: why default index for primary key is clustered?"
- Reply: Adam Machanic: "Re: why default index for primary key is clustered?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|