We tested SQL timeouts and determined that the audit table is the bottleneck - all tables in our system contain insert, update, and delete triggers that trigger a new audit record.
This means that the audit table is the largest and busiest table in the system. However, data is received and not output (within this system), so select performance is not required.
Running select top 10 returns recently the insertion records, not the "first" records. order by works, of course, but I would expect select top to return strings based on their order on disk - I would expect it to return the smallest PK values.
It has been suggested that we discard the clustered index and, in fact, the primary key (a unique constraint). As I mentioned earlier, there is no need to select from this table on this system.
What is the performance impact of a clustered index on a table? What are the (unselected) consequences of having an unindexed, unclassified keyless table? Any other suggestions?
change
our audit includes CLR functions, and now I compare with and without PCs, indexes, FK, etc., to determine the relative cost of CLR functions and restrictions.
After the study, poor performance was not associated with insert , but instead was the CLR function that organized the audit. After removing the CLR and instead using the direct TSQL process, performance improved 20 times.
During testing, I also determined that columns with a clustered index and identifiers had little effect on insertion time, at least with respect to any other processing that takes place.
// updating 10k rows in a table with trigger // using CLR function PK (identity, clustered)- ~78000ms No PK, no index - ~81000ms // using straight TSQL PK (identity, clustered) - 2174ms No PK, no index - 2102ms