Fix user data batch query perf
This commit is contained in:
@@ -291,8 +291,8 @@ namespace Emby.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
using var dbContext = _repository.CreateDbContext();
|
using var dbContext = _repository.CreateDbContext();
|
||||||
withLocalAlternates = dbContext.LinkedChildren
|
withLocalAlternates = dbContext.LinkedChildren
|
||||||
.Where(lc => lc.ChildType == Jellyfin.Database.Implementations.Entities.LinkedChildType.LocalAlternateVersion
|
.Where(lc => lc.ChildType == Jellyfin.Database.Implementations.Entities.LinkedChildType.LocalAlternateVersion)
|
||||||
&& localProbeIds.Contains(lc.ParentId))
|
.WhereOneOrMany(localProbeIds, lc => lc.ParentId)
|
||||||
.Select(lc => lc.ParentId)
|
.Select(lc => lc.ParentId)
|
||||||
.Distinct()
|
.Distinct()
|
||||||
.ToHashSet();
|
.ToHashSet();
|
||||||
|
|||||||
Reference in New Issue
Block a user