Skip to content
Snippets Groups Projects
Commit 8cb20ba0 authored by Jason Salyers's avatar Jason Salyers
Browse files

[JES] Missed a closing paren

parent 627df934
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!370Jsalyers muting at sql level
This commit is part of merge request !370. Comments created here will be created in the context of that merge request.
......@@ -56,7 +56,7 @@ BEGIN
JOIN hive_posts hp1 ON hp1.id = hpt.post_id
JOIN hive_accounts_view ha ON hp1.author_id = ha.id
WHERE hpt.tag_id = __hive_tag AND hp1.counter_deleted = 0 AND hp1.depth = 0 AND NOT ha.is_grayed AND ( __post_id = 0 OR hp1.id < __post_id )
AND (CASE WHEN _observer <> '' THEN NOT EXISTS (SELECT 1 FROM muted_accounts_view WHERE observer = _observer AND muted = hp.author) ELSE true END
AND (CASE WHEN _observer <> '' THEN NOT EXISTS (SELECT 1 FROM muted_accounts_view WHERE observer = _observer AND muted = hp.author) ELSE true END)
--ORDER BY hp1.id + 0 DESC -- this workaround helped the query to better choose indexes, but after some time it started to significally slow down
ORDER BY hp1.id DESC
LIMIT _limit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment