Skip to content
Snippets Groups Projects
Commit ab0c0e05 authored by Bartek Wrona's avatar Bartek Wrona Committed by Jason Salyers
Browse files

bridge_api.get_account_posts "by comment" optimization.

parent f4f9c18e
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.
......@@ -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