Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
hivemind
Merge requests
!370
Something went wrong on our end
Jsalyers muting at sql level
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Jsalyers muting at sql level
jsalyers-muting-at-sql-level
into
develop
Overview
9
Commits
92
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Merged
Jason Salyers
requested to merge
jsalyers-muting-at-sql-level
into
develop
4 years ago
Overview
9
Commits
92
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Viewing commit
8cb20ba0
Prev
Next
Show latest version
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8cb20ba0
[JES] Missed a closing paren
· 8cb20ba0
Jason Salyers
authored
4 years ago
hive/db/sql_scripts/bridge_get_ranked_post_for_tag.sql
+
1
−
1
Options
@@ -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
Loading