Commit 4bdebe4
sp_IndexCleanup: fix heap table index detection (#727)
The partition stats row count filter used ps.index_id = 1 which only
matches clustered indexes. Heaps use index_id = 0, so heap tables
were excluded entirely from deduplication analysis.
Changed to ps.index_id IN (0, 1) to include both heaps and clustered.
Closes #727
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b30766c commit 4bdebe4
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2311 | 2311 | | |
2312 | 2312 | | |
2313 | 2313 | | |
2314 | | - | |
| 2314 | + | |
2315 | 2315 | | |
2316 | 2316 | | |
2317 | 2317 | | |
| |||
0 commit comments