diff options
| author | crobibero <cody@robibe.ro> | 2020-12-03 20:16:11 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-12-03 20:16:11 -0700 |
| commit | b7443f6042e8c641be969abafad7202459d2b413 (patch) | |
| tree | 8a9f3781c0413f820ac25d1f8850ee373e209a7d | |
| parent | cff2b7fed1edb55cf62f723b5ce96ae918f4b049 (diff) | |
Optimize FavoritePersons query
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 50c7a07d4..f7a6708c9 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -5039,9 +5039,9 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type if (query.User != null && query.IsFavorite.HasValue) { - commandText.Append(" LEFT JOIN TypedBaseItems tbi ON tbi.Name=p.Name AND tbi.Type='"); + commandText.Append(" INNER JOIN TypedBaseItems tbi ON tbi.Name=p.Name AND tbi.Type='"); commandText.Append(typeof(Person).FullName); - commandText.Append("' LEFT JOIN UserDatas ON tbi.UserDataKey=key AND userId=@UserId"); + commandText.Append("' INNER JOIN UserDatas ON tbi.UserDataKey=key AND userId=@UserId"); } var whereClauses = GetPeopleWhereClauses(query, null); |
