|
Posted by Erland Sommarskog on 04/29/06 00:44
John Rivers (first10@btinternet.com) writes:
> when a clustered index is present the records *are* physically ordered
> on disk to match the index
>
> that is the whole point of a clustered index
Actually, they are ordered if you follow the page links. But if pages
are in disorder, the physical order on disk may be yet another one.
> and by default a select statement with no ORDER BY will always return
> data in the order of the clustered index (when present)
No. This may have been true by chance for SQL Server up version 6.5. It is
definitely not correct for SQL 7 and later.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|