diff options
| author | Cody Robibero <cody@robibe.ro> | 2026-08-22 08:45:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-22 08:45:42 -0400 |
| commit | 0d4cbb999bbac9920caeeb5cd7174b1dc9758bff (patch) | |
| tree | ac3b70bb41af69de26d59e71465fc99db42273ed /src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs | |
| parent | c04f11bd76acd19a1440bbb4351160642a09ef9c (diff) | |
| parent | 587f06dccc67a6ad67b43cf8889b6b7605950bcf (diff) | |
Merge pull request #17607 from Shadowghost/optimize-db-helper-memory
Optimize query helper memory
Diffstat (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs')
| -rw-r--r-- | src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs index afa9eee363..48c537bbd3 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/ModelConfiguration/MediaStreamInfoConfiguration.cs @@ -13,5 +13,9 @@ public class MediaStreamInfoConfiguration : IEntityTypeConfiguration<MediaStream public void Configure(EntityTypeBuilder<MediaStreamInfo> builder) { builder.HasKey(e => new { e.ItemId, e.StreamIndex }); + + // Covering index for the stream filters. ItemId comes second because it is what they project and + // dedupe on; Language and IsExternal follow only to keep their predicates off the table. + builder.HasIndex(e => new { e.StreamType, e.ItemId, e.Language, e.IsExternal }); } } |
