Tagged Questions
15
votes
4answers
1k views
Is 'Avoid creating a clustered index based on an incrementing key' a myth from SQL Server 2000 days?
Our databases consist of lots of tables, most of them using an integer surrogate key as a primary key. About half of these primary keys are on identity columns.
The database development started in ...
0
votes
1answer
144 views
How do you avoid a deadlock on the primary key of a table? [closed]
So I have a deadlock that looks like this. Both sides of the deadlock complain about the the primary key clustered index.
<deadlock-list>
<deadlock victim="processec49b8">
...
11
votes
2answers
830 views
Is there any tangible difference between a unique clustered index and a clustered primary key?
I understand that there may be a difference in meaning or intent between the two, but are there any behavioral or performance differences between a clustered primary key and a clustered unique index?
2
votes
2answers
160 views
Defrag a HEAP by creating clustered index and immediately dropping it
I'm writing a script which intends to defrag a HEAP based table by creating a dummy col with a clustered index and then immediately dropping it. (It's someone else's app and I don't want to make any ...
3
votes
1answer
173 views
How do I automate converting heaps into clustered indexes?
I have around 40 tables in one of our production databases that, for varying reasons, where not created with a clustered index.
What is the best automated method for converting these heaps?
Since ...
2
votes
1answer
105 views
After dropping the clustered index, it is still attempting to do a clustered insert
I am trying to convert data from one database system to another. One of the tables I need to transfer and format contains over 10 million rows.
I am running the following script to do it:
USE ...
2
votes
2answers
679 views
Why is query using Clustered Index when it shouldn't?
Let us presume I have a table named Category in a SQL Server 2005 database. Category has category_id (bigint, identity) as its primary key and name (nvarchar(50)). There is obviously a clustered ...