Skip to content

perf(tags): add index on mail_message_tags.tag_id#13130

Open
hamza221 wants to merge 1 commit into
mainfrom
perf/tag-id-index
Open

perf(tags): add index on mail_message_tags.tag_id#13130
hamza221 wants to merge 1 commit into
mainfrom
perf/tag-id-index

Conversation

@hamza221

@hamza221 hamza221 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Assisted-by: ClaudeCode:claude-opus-4-8[1m]

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Tag-filtered searches join mail_message_tags and filter on
tags.tag_id IN (...) in MessageMapper::findIdsByQuery. The table only
had PRIMARY KEY(id) and an index on imap_message_id, so the tag_id
filter scanned unindexed. Add mail_msg_tags_tag_id_idx to support it.

Assisted-by: ClaudeCode:claude-opus-4-8[1m]
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant