Skip to content

Additonal index changes to cover postgres - #5893

Open
rbev wants to merge 3 commits into
masterfrom
index-groups
Open

rbev wants to merge 3 commits into
masterfrom
index-groups

Conversation

@rbev

@rbev rbev commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This pull request improves query performance for failure groups on PostgreSQL and refactors per provider entity configurations to use configuration classes.

Entity Configuration Refactoring:

  • Moved index definitions for FailedMessageEntity and FailedMessageGroupEntity into dedicated configuration classes (FailedMessageConfiguration and FailedMessageGroupConfiguration) for both PostgreSQL and SQL Server providers, and updated the main DbContext to apply these configurations instead of defining indexes inline. [1] [2] [3] [4] [5]

Index and Query Performance Improvements:

  • Enhanced the failed_messages table index to include UniqueMessageId and added covering columns (FirstTimeOfFailure, LastTimeOfFailure) for more efficient queries. The failed_message_groups index now includes both FailedMessageUniqueId and Title for better index-only scans. [1] [2] [3]
  • Updated the EF Core model snapshots and migration files to reflect new index definitions and included columns, ensuring the database schema matches the new configuration. [1] [2] [3] [4]

@rbev
rbev force-pushed the index-groups branch 2 times, most recently from 3b7af38 to ea970f5 Compare September 15, 2026 05:06
@rbev
rbev marked this pull request as ready for review September 15, 2026 05:15

@johnsimons johnsimons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is only a question of lots of (string)null, which I don't get it!

@rbev

rbev commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

There is only a question of lots of (string)null, which I don't get it!

Yeah they are strange, but they are from generated code.
I can try reverting the last SQLserver migration and see if it happens again, my efcore tooling was recently updated so it could be from that.

@rbev
rbev enabled auto-merge September 15, 2026 07:52
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.

3 participants