Skip to content
Snippets Groups Projects
Commit 635cf6e0 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'bw_bridge_get_account_posts_by_comments_opt' into 'develop'

bridge_api.get_account_posts "by comment" optimization.

See merge request !373
parents 31a03fa6 685fd627
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!373bridge_api.get_account_posts "by comment" optimization.
...@@ -48,9 +48,14 @@ BEGIN ...@@ -48,9 +48,14 @@ BEGIN
hp.is_pinned, hp.is_pinned,
hp.curator_payout_value hp.curator_payout_value
FROM FROM
hive_posts_view hp (
WHERE SELECT hp1.id
hp.author_id = __account_id AND hp.depth > 0 AND ( __post_id = 0 OR hp.id < __post_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 ORDER BY hp.id DESC
LIMIT _limit; LIMIT _limit;
END END
......
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