fix(users/Profpatsch/whatcd-resolver): use artist_ids in filtered
I missed this! It speeds up `/artist` by another 50%. Change-Id: I138c38185ea7fb606a139b436b9c956f7b8e1a37 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13244 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
parent
d379e1742f
commit
ca6c5ac59e
1 changed files with 1 additions and 1 deletions
|
|
@ -678,7 +678,7 @@ getBestTorrents opts = do
|
|||
ON (NOT ?::bool OR is_favourite)
|
||||
WHERE
|
||||
-- filter by artist id
|
||||
(?::bool OR (to_jsonb(?::int) <@ (jsonb_path_query_array(full_json_result, '$.artists[*].id'))))
|
||||
(?::bool OR (?::int = any (artist_ids)))
|
||||
-- filter by torrent ids
|
||||
AND
|
||||
(?::bool OR torrent_id = ANY (?::int[]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue