Skip to content

sp_IndexCleanup: fix heap table index detection (#727)#729

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/indexcleanup-heap-detection
Mar 26, 2026
Merged

sp_IndexCleanup: fix heap table index detection (#727)#729
erikdarlingdata merged 1 commit intodevfrom
fix/indexcleanup-heap-detection

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

Changed ps.index_id = 1 to ps.index_id IN (0, 1) in the partition stats row count filter so heap tables (index_id = 0) are included in deduplication analysis.

Adversarial test suite: 18/18 passing.

Closes #727

🤖 Generated with Claude Code

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>
@erikdarlingdata erikdarlingdata merged commit ae10a13 into dev Mar 26, 2026
@erikdarlingdata erikdarlingdata deleted the fix/indexcleanup-heap-detection branch April 6, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant