mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Optimize FavoritePersons query
This commit is contained in:
parent
cff2b7fed1
commit
b7443f6042
@ -5039,9 +5039,9 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|||||||
|
|
||||||
if (query.User != null && query.IsFavorite.HasValue)
|
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(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);
|
var whereClauses = GetPeopleWhereClauses(query, null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user