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

bridge_api.get_account_posts "by comment" optimization.

parent 31a03fa6
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!373bridge_api.get_account_posts "by comment" optimization.
This commit is part of merge request !373. Comments created here will be created in the context of that merge request.
......@@ -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
......
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