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
Commits
685fd627
Commit
685fd627
authored
4 years ago
by
Bartek Wrona
Browse files
Options
Downloads
Patches
Plain Diff
bridge_api.get_account_posts "by comment" optimization.
parent
31a03fa6
No related branches found
No related tags found
2 merge requests
!456
Release candidate v1 24
,
!373
bridge_api.get_account_posts "by comment" optimization.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hive/db/sql_scripts/bridge_get_account_posts_by_comments.sql
+8
-3
8 additions, 3 deletions
hive/db/sql_scripts/bridge_get_account_posts_by_comments.sql
with
8 additions
and
3 deletions
hive/db/sql_scripts/bridge_get_account_posts_by_comments.sql
+
8
−
3
View file @
685fd627
...
...
@@ -48,9 +48,14 @@ BEGIN
hp
.
is_pinned
,
hp
.
curator_payout_value
FROM
hive_posts_view
hp
WHERE
hp
.
author_id
=
__account_id
AND
hp
.
depth
>
0
AND
(
__post_id
=
0
OR
hp
.
id
<
__post_id
)
(
SELECT
hp1
.
id
FROM
hive_posts
hp1
WHERE
hp1
.
author_id
=
__account_id
AND
hp1
.
counter_deleted
=
0
AND
hp1
.
depth
>
0
AND
(
__post_id
=
0
OR
hp1
.
id
<
__post_id
)
ORDER
BY
hp1
.
id
DESC
LIMIT
_limit
)
ds
JOIN
hive_posts_view
hp
ON
ds
.
id
=
hp
.
id
ORDER
BY
hp
.
id
DESC
LIMIT
_limit
;
END
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment