Skip to content

perf: index common snapshot query columns - #79

Merged
codeasier merged 1 commit into
mainfrom
issue-73-snapshot-indexes
Jul 28, 2026
Merged

codeasier merged 1 commit into
mainfrom
issue-73-snapshot-indexes

Conversation

@codeasier

Copy link
Copy Markdown
Owner

Summary

  • create indexes for allocated, active, and reserved on per-device trace tables
  • create indexes for allocEventId, freeEventId, and size on per-device block tables
  • verify index coverage through PRAGMA index_list and PRAGMA index_info regression tests

Verification

  • PYTHONPATH=src pytest (364 passed)
  • PYTHONPATH=src pytest tests/test_contract_cli_mcp.py (7 passed)
  • ruff check .
  • black --check .
  • 100k-row benchmark: 200 selective queries improved from 0.4484s to 0.0008s (548.7x)

Closes #73

@codeasier
codeasier merged commit 9740b3c into main Jul 28, 2026
5 checks passed
@codeasier
codeasier deleted the issue-73-snapshot-indexes branch October 3, 2026 19:18
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.

[FEATURE] 为 SnapshotDB 表创建常用查询列的索引(子任务 #72-1)

1 participant