SamehMohamedEl-Sayed / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

clustered index on ELMAH_Error #376

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What new or enhanced feature are you proposing?
Currently, there is no clustered index on ELMAH_Error. From what I understand, 
this was changed back in r131 as a performance issue. However, this changed the 
nature of the table to a heap.

I would propose that if ErrorId is not appropriate for a clustered index (it is 
currently set as the primary key, but non-clustered) then place Sequence as the 
clustered index with ErrorId remaining as a non-clustered unique index on the 
table. 
Previous suggestion (issue 222) was:
CREATE UNIQUE CLUSTERED INDEX [PK_Sequence] ON [dbo].[ELMAH_Error] 
(
    [Sequence] ASC
)

CREATE UNIQUE NONCLUSTERED INDEX [IX_ErrorId] ON [dbo].[ELMAH_Error] 
(
    [ErrorId] ASC
)

What goal would this enhancement help you achieve?
Better, more consistent performance and adherence with generally recognized 
best practices. (see http://msdn.microsoft.com/en-us/library/hh213609.aspx)

Original issue reported on code.google.com by elsi...@gmail.com on 26 Oct 2014 at 2:17