I have a SQL table with 29 columns and 3000-4000 rows. It has a few spatial fields (2 geometry and 1 geography) but otherwise nothing special.
Deleting a single row from this table now takes about 1000 ms, both in production and development environments.
Delete from AdminDivisions
where AdminDivisionID=(Select top 1 AdminDivisionID from AdminDivisions)
Here's what I've tried (in a dev environment):
I've made a clone of the table and painstakingly recreated all of its triggers, foreign keys, constraints, and indexes. Deleting a row from the clone is instantaneous.
Delete from _ad where AdminDivisionID=(Select top 1 AdminDivisionID from AdminDivisions)
- I've deleted all triggers, foreign keys, constraints, and indexes from the original table. Deleting a row from the stripped-down table still takes around 1000 ms on average.
What could I try next?
Update 1
Here's the execution plan (full size here). It is the FKs referencing this table - and the table's own PK index. Still not sure where to go from here.
Update 2
@Martin: Here is the output with SET STATISTICS IO ON:
Table 'Instances'. Scan count 1, logical reads 12, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Locations'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'AwardsAdminDivisionsXtab'. Scan count 1, logical reads 3, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'IndicatorResultComments'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'IndicatorResults'. Scan count 1, logical reads 35958, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Transactions'. Scan count 1, logical reads 155, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'LogicCheckViolations'. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'AdminDivisions'. Scan count 1, logical reads 14, physical reads 0, read-ahead reads 0, lob logical reads 1, lob physical reads 0, lob read-ahead reads 0.
Table 'Worktable'. Scan count 1, logical reads 4, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'AspNet_SqlCacheTablesForChangeNotification'. Scan count 0, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.