Feature - AB#32084 Application List Performance Indexes#2421
Merged
DavidBrightBcGov merged 2 commits intoMay 8, 2026
Conversation
…ntApplications table query optimization Recreated indexes post .NET10 upgrade from previous branch to properly capture migration changes
|
1 similar comment
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds several EF Core/PostgreSQL indexes (primarily TenantId-anchored and a few application-list specific indexes) to improve query performance for the Grant Applications listing and related joins in the tenant database, and updates the EF Core model snapshot accordingly.
Changes:
- Added application-list performance indexes on
Applications(ReferenceNo, TenantId+SubmissionDate) and supporting join tables (TenantId+ApplicationId). - Added TenantId-focused indexes on supporting tables (
Persons,Applicants,ApplicationForms). - Updated
GrantTenantDbContextmodel configuration andGrantTenantDbContextModelSnapshotto reflect the new indexes.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/GrantTenantDbContextModelSnapshot.cs | Snapshot updates to include the new indexes. |
| applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20260507201139_Add_Supporting_Table_TenantId_Indexes.cs | Adds TenantId-related indexes for supporting tables. |
| applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20260507201003_Add_Applications_Performance_Indexes.cs | Adds performance-oriented indexes for the applications list query patterns. |
| applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/Migrations/TenantMigrations/20260507201003_Add_Applications_Performance_Indexes.Designer.cs | Migration designer reflecting the target model at the time of migration. |
| applications/Unity.GrantManager/src/Unity.GrantManager.EntityFrameworkCore/EntityFrameworkCore/GrantTenantDbContext.cs | Adds the corresponding HasIndex(...) configurations to the EF model. |
| .IsRequired(false) | ||
| .OnDelete(DeleteBehavior.NoAction); | ||
|
|
||
| b.HasIndex(x => new { x.TenantId, x.IsDeleted }).HasFilter("\"IsDeleted\" = false"); |
Comment on lines
+18
to
+22
| migrationBuilder.CreateIndex( | ||
| name: "IX_ApplicationForms_TenantId_IsDeleted", | ||
| table: "ApplicationForms", | ||
| columns: new[] { "TenantId", "IsDeleted" }, | ||
| filter: "\"IsDeleted\" = false"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Column index generation created across main tables to support the GrantApplications table query optimization
Recreated indexes post .NET10 upgrade from previous branch to properly capture migration changes