i know when I set a primary key for a table.i will get a cluster index.
but if i remove that cluster option on INDEX/KEY OPTION PAGE. i still
find i can choose ASC /DESC?
does it means there is still a index there?An index is always created for a primary key constraint. By default this is
a clustered index but you can also choose a non-clustered index (by
deselecting the clustered option). The ASC/DESC option applies to both types
of index.
David Portas
SQL Server MVP
--|||we know, INDEX may some time affect performance of DataBase if we often
update data. why SQL SERVER compel us bind a index to a primary key?|||Because that is by far the fastest and most efficient way to enforce
uniqueness. Without index, SQL-Server would have to do a table scan
whenever a new row is added, just to see if it's primary key is unique.
In addition to that, if you do not update the indexed column(s) or the
column(s) of the clustered index, then the index will not affect UPDATE
performance.
Gert-Jan
why bind a index to a primary key? wrote:
> we know, INDEX may some time affect performance of DataBase if we often updat
e data. why SQL SERVER compel us bind a index to a primary key?
(Please reply only to the newsgroup)
No comments:
Post a Comment