Skip to content

Make loading past sessions faster#1854

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:faster-past-sessions
Feb 26, 2026
Merged

Make loading past sessions faster#1854
dgageot merged 1 commit intodocker:mainfrom
dgageot:faster-past-sessions

Conversation

@dgageot
Copy link
Member

@dgageot dgageot commented Feb 26, 2026

No description provided.

Signed-off-by: David Gageot <david.gageot@docker.com>
@dgageot dgageot requested a review from a team as a code owner February 26, 2026 07:47
Copy link

@docker-agent docker-agent bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR adds a database migration to create an index on session_items(session_id, item_type) to speed up session summary message counts. The change is clean and well-structured.

I verified that this new index serves a different query pattern than the existing idx_session_items_session(session_id, position) index from migration 14. The new index is specifically designed to optimize type-specific queries (e.g., counting messages), while the existing index supports ordered retrieval. Both indexes are justified and serve different access patterns.

No issues found. ✅

@dgageot dgageot merged commit a7e4bd8 into docker:main Feb 26, 2026
8 checks passed
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.

2 participants