Skip to content
Snippets Groups Projects
Commit 55f55884 authored by Andrzej Such's avatar Andrzej Such
Browse files

Postgrest - restore LIMIT in queres which uses CTE and limit, appears that...

Postgrest - restore LIMIT in queres which uses CTE and limit, appears that it's important for query efficiency
parent a65035f6
No related branches found
No related tags found
2 merge requests!827Merge develop changes to master,!779Postgrest - restore LIMIT in queres which uses CTE and limit, appears that...
Showing
with 53 additions and 5 deletions
...@@ -93,6 +93,7 @@ BEGIN ...@@ -93,6 +93,7 @@ BEGIN
ELSE hivemind_app.get_number_of_mentions_in_post( hnv.post_id ) ELSE hivemind_app.get_number_of_mentions_in_post( hnv.post_id )
END as mentions END as mentions
) as hm ) as hm
LIMIT _limit
) hive_notification_cache ) hive_notification_cache
); );
END END
......
DROP FUNCTION IF EXISTS hivemind_endpoints.bridge_api_get_posts; DROP FUNCTION IF EXISTS hivemind_endpoints.bridge_api_get_post;
CREATE FUNCTION hivemind_endpoints.bridge_api_get_posts(IN _json_is_object BOOLEAN, IN _params JSONB) CREATE FUNCTION hivemind_endpoints.bridge_api_get_post(IN _json_is_object BOOLEAN, IN _params JSONB)
RETURNS JSONB RETURNS JSONB
LANGUAGE 'plpgsql' LANGUAGE 'plpgsql'
STABLE STABLE
......
...@@ -88,6 +88,7 @@ BEGIN ...@@ -88,6 +88,7 @@ BEGIN
END as mentions END as mentions
) as hm ) as hm
ORDER BY hnv.id DESC ORDER BY hnv.id DESC
LIMIT _limit
) )
SELECT SELECT
notifications.id, notifications.id,
...@@ -104,6 +105,7 @@ BEGIN ...@@ -104,6 +105,7 @@ BEGIN
END END
) AS url ) AS url
FROM notifications FROM notifications
LIMIT _limit
) row ) row
); );
END END
......
...@@ -85,6 +85,7 @@ BEGIN ...@@ -85,6 +85,7 @@ BEGIN
JOIN hivemind_app.hive_accounts ha ON ha.id = hp.author_id JOIN hivemind_app.hive_accounts ha ON ha.id = hp.author_id
JOIN hivemind_app.hive_permlink_data hpd ON hpd.id = hp.permlink_id JOIN hivemind_app.hive_permlink_data hpd ON hpd.id = hp.permlink_id
ORDER BY blog.created_at DESC, blog.post_id DESC ORDER BY blog.created_at DESC, blog.post_id DESC
LIMIT _limit
) row ) row
); );
ELSE ELSE
...@@ -147,6 +148,7 @@ BEGIN ...@@ -147,6 +148,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(blog.post_id) hp LATERAL hivemind_app.get_post_view_by_id(blog.post_id) hp
-- in python code order was ASC, but because we append new elements to array in reverse order, order is DESC here -- in python code order was ASC, but because we append new elements to array in reverse order, order is DESC here
ORDER BY blog.created_at DESC, blog.post_id DESC ORDER BY blog.created_at DESC, blog.post_id DESC
LIMIT _limit
) row ) row
); );
END IF; END IF;
......
...@@ -100,6 +100,7 @@ BEGIN ...@@ -100,6 +100,7 @@ BEGIN
FROM blog_posts, FROM blog_posts,
LATERAL hivemind_app.get_post_view_by_id(blog_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(blog_posts.id) hp
ORDER BY hp.id DESC ORDER BY hp.id DESC
LIMIT _limit
) row ) row
); );
......
...@@ -49,6 +49,7 @@ BEGIN ...@@ -49,6 +49,7 @@ BEGIN
FROM following_set fs FROM following_set fs
JOIN hivemind_app.hive_accounts ha ON fs.following = ha.id JOIN hivemind_app.hive_accounts ha ON fs.following = ha.id
ORDER BY fs.id DESC ORDER BY fs.id DESC
LIMIT (_params->'limit')::INT
) row ) row
), ),
'[]'::jsonb '[]'::jsonb
......
...@@ -42,7 +42,7 @@ _result = ( ...@@ -42,7 +42,7 @@ _result = (
ORDER BY SUM(hp.payout + hp.pending_payout) DESC, hcd.category ASC ORDER BY SUM(hp.payout + hp.pending_payout) DESC, hcd.category ASC
LIMIT _limit LIMIT _limit
) )
SELECT name, comments - top_posts AS comments, top_posts, total_payouts FROM row SELECT name, comments - top_posts AS comments, top_posts, total_payouts FROM row LIMIT _limit
) row ) row
); );
......
...@@ -96,6 +96,7 @@ BEGIN ...@@ -96,6 +96,7 @@ BEGIN
pv.parent_author pv.parent_author
FROM posts, FROM posts,
LATERAL hivemind_app.get_post_view_by_id (posts.id) pv LATERAL hivemind_app.get_post_view_by_id (posts.id) pv
LIMIT _comments_amount
) row ) row
) )
) )
......
...@@ -90,6 +90,7 @@ BEGIN ...@@ -90,6 +90,7 @@ BEGIN
FROM blog, FROM blog,
LATERAL hivemind_app.get_post_view_by_id(blog.post_id) hp LATERAL hivemind_app.get_post_view_by_id(blog.post_id) hp
ORDER BY blog.created_at DESC, blog.post_id DESC ORDER BY blog.created_at DESC, blog.post_id DESC
LIMIT _limit
) row ) row
); );
...@@ -178,6 +179,7 @@ BEGIN ...@@ -178,6 +179,7 @@ BEGIN
FROM ds, FROM ds,
LATERAL hivemind_app.get_post_view_by_id(ds.id) hp LATERAL hivemind_app.get_post_view_by_id(ds.id) hp
ORDER BY ds.id DESC ORDER BY ds.id DESC
LIMIT _limit
) row ) row
); );
...@@ -279,6 +281,7 @@ BEGIN ...@@ -279,6 +281,7 @@ BEGIN
FROM feed, FROM feed,
LATERAL hivemind_app.get_post_view_by_id(feed.post_id) hp LATERAL hivemind_app.get_post_view_by_id(feed.post_id) hp
ORDER BY feed.min_created DESC, feed.post_id DESC ORDER BY feed.min_created DESC, feed.post_id DESC
LIMIT _limit
) row ) row
); );
...@@ -363,6 +366,7 @@ BEGIN ...@@ -363,6 +366,7 @@ BEGIN
FROM posts, FROM posts,
LATERAL hivemind_app.get_post_view_by_id(posts.id) hp LATERAL hivemind_app.get_post_view_by_id(posts.id) hp
ORDER BY posts.id DESC ORDER BY posts.id DESC
LIMIT _limit
) row ) row
); );
...@@ -454,6 +458,7 @@ BEGIN ...@@ -454,6 +458,7 @@ BEGIN
FROM replies, FROM replies,
LATERAL hivemind_app.get_post_view_by_id(replies.id) hp LATERAL hivemind_app.get_post_view_by_id(replies.id) hp
ORDER BY replies.id DESC ORDER BY replies.id DESC
LIMIT _limit
) row ) row
); );
...@@ -546,6 +551,7 @@ BEGIN ...@@ -546,6 +551,7 @@ BEGIN
FROM payouts, FROM payouts,
LATERAL hivemind_app.get_post_view_by_id(payouts.id) hp LATERAL hivemind_app.get_post_view_by_id(payouts.id) hp
ORDER BY payouts.total_payout DESC, payouts.id DESC ORDER BY payouts.total_payout DESC, payouts.id DESC
LIMIT _limit
) row ) row
); );
......
...@@ -114,7 +114,7 @@ BEGIN ...@@ -114,7 +114,7 @@ BEGIN
WHEN __method_type = 'get_community_context' THEN WHEN __method_type = 'get_community_context' THEN
result := hivemind_endpoints.bridge_api_get_community_context(__json_with_params_is_object, __params); result := hivemind_endpoints.bridge_api_get_community_context(__json_with_params_is_object, __params);
WHEN __method_type = 'get_post' THEN WHEN __method_type = 'get_post' THEN
result := hivemind_endpoints.bridge_api_get_posts(__json_with_params_is_object, __params); result := hivemind_endpoints.bridge_api_get_post(__json_with_params_is_object, __params);
WHEN __method_type = 'get_payout_stats' THEN WHEN __method_type = 'get_payout_stats' THEN
result := hivemind_endpoints.bridge_api_get_payout_stats(__json_with_params_is_object, __params); result := hivemind_endpoints.bridge_api_get_payout_stats(__json_with_params_is_object, __params);
WHEN __method_type = 'get_account_posts' THEN WHEN __method_type = 'get_account_posts' THEN
...@@ -141,7 +141,7 @@ BEGIN ...@@ -141,7 +141,7 @@ BEGIN
result := hivemind_endpoints.bridge_api_get_posts_header(__json_with_params_is_object, __params); result := hivemind_endpoints.bridge_api_get_posts_header(__json_with_params_is_object, __params);
WHEN __method_type = 'normalize_post' THEN WHEN __method_type = 'normalize_post' THEN
-- according to python code, there are no checks if anything is good, just extract author & permlink and call get_post -- according to python code, there are no checks if anything is good, just extract author & permlink and call get_post
result := hivemind_endpoints.bridge_api_get_posts(True, jsonb_build_object('author', __params->'post'->>'author', 'permlink', __params->'post'->>'permlink')); result := hivemind_endpoints.bridge_api_get_post(True, jsonb_build_object('author', __params->'post'->>'author', 'permlink', __params->'post'->>'permlink'));
WHEN __method_type = 'get_profile' THEN WHEN __method_type = 'get_profile' THEN
result := hivemind_endpoints.bridge_api_get_profile(__json_with_params_is_object, __params); result := hivemind_endpoints.bridge_api_get_profile(__json_with_params_is_object, __params);
WHEN __method_type = 'list_muted_reasons_enum' THEN WHEN __method_type = 'list_muted_reasons_enum' THEN
......
...@@ -90,6 +90,7 @@ BEGIN ...@@ -90,6 +90,7 @@ BEGIN
FROM pinned_post, FROM pinned_post,
LATERAL hivemind_app.get_post_view_by_id(pinned_post.id) hp LATERAL hivemind_app.get_post_view_by_id(pinned_post.id) hp
ORDER BY hp.id DESC ORDER BY hp.id DESC
LIMIT _limit
) row ) row
); );
END IF; END IF;
...@@ -204,6 +205,7 @@ BEGIN ...@@ -204,6 +205,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp
ORDER BY ORDER BY
hp.sc_trend DESC, hp.id DESC hp.sc_trend DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -296,6 +298,7 @@ BEGIN ...@@ -296,6 +298,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp
ORDER BY ORDER BY
hp.promoted DESC, hp.id DESC hp.promoted DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -393,6 +396,7 @@ BEGIN ...@@ -393,6 +396,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp
ORDER BY ORDER BY
community_posts.total_payout DESC, hp.id DESC community_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -487,6 +491,7 @@ BEGIN ...@@ -487,6 +491,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp
ORDER BY ORDER BY
community_posts.total_payout DESC, hp.id DESC community_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -580,6 +585,7 @@ BEGIN ...@@ -580,6 +585,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp
ORDER BY ORDER BY
hp.sc_hot DESC, hp.id DESC hp.sc_hot DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -681,6 +687,7 @@ BEGIN ...@@ -681,6 +687,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp
ORDER BY ORDER BY
community_posts.id DESC community_posts.id DESC
LIMIT _limit
) row ) row
); );
...@@ -770,6 +777,7 @@ BEGIN ...@@ -770,6 +777,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(community_posts.id) hp
ORDER BY ORDER BY
community_posts.total_payout DESC, hp.id DESC community_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -866,6 +874,7 @@ BEGIN ...@@ -866,6 +874,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp
ORDER BY ORDER BY
hp.sc_trend DESC, hp.id DESC hp.sc_trend DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -961,6 +970,7 @@ BEGIN ...@@ -961,6 +970,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp
ORDER BY ORDER BY
hp.sc_hot DESC, hp.id DESC hp.sc_hot DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1053,6 +1063,7 @@ BEGIN ...@@ -1053,6 +1063,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp
ORDER BY ORDER BY
hp.id DESC hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1148,6 +1159,7 @@ BEGIN ...@@ -1148,6 +1159,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp
ORDER BY ORDER BY
hp.promoted DESC, hp.id DESC hp.promoted DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1246,6 +1258,7 @@ BEGIN ...@@ -1246,6 +1258,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp
ORDER BY ORDER BY
tag_posts.total_payout DESC, hp.id DESC tag_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1342,6 +1355,7 @@ BEGIN ...@@ -1342,6 +1355,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp
ORDER BY ORDER BY
tag_posts.total_payout DESC, hp.id DESC tag_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1434,6 +1448,7 @@ BEGIN ...@@ -1434,6 +1448,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(tag_posts.id) hp
ORDER BY ORDER BY
tag_posts.total_payout DESC, hp.id DESC tag_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1522,6 +1537,7 @@ BEGIN ...@@ -1522,6 +1537,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp
ORDER BY ORDER BY
hp.sc_trend DESC, hp.id DESC hp.sc_trend DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1610,6 +1626,7 @@ BEGIN ...@@ -1610,6 +1626,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp
ORDER BY ORDER BY
hp.sc_hot DESC, hp.id DESC hp.sc_hot DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1694,6 +1711,7 @@ BEGIN ...@@ -1694,6 +1711,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp
ORDER BY ORDER BY
hp.id DESC hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1782,6 +1800,7 @@ BEGIN ...@@ -1782,6 +1800,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp
ORDER BY ORDER BY
hp.promoted DESC, hp.id DESC hp.promoted DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1875,6 +1894,7 @@ BEGIN ...@@ -1875,6 +1894,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp
ORDER BY ORDER BY
observer_posts.total_payout DESC, hp.id DESC observer_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -1964,6 +1984,7 @@ BEGIN ...@@ -1964,6 +1984,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp
ORDER BY ORDER BY
observer_posts.total_payout DESC, hp.id DESC observer_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2053,6 +2074,7 @@ BEGIN ...@@ -2053,6 +2074,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(observer_posts.id) hp
ORDER BY ORDER BY
observer_posts.total_payout DESC, hp.id DESC observer_posts.total_payout DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2145,6 +2167,7 @@ BEGIN ...@@ -2145,6 +2167,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp
ORDER BY ORDER BY
hp.sc_trend DESC, hp.id DESC hp.sc_trend DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2236,6 +2259,7 @@ BEGIN ...@@ -2236,6 +2259,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp
ORDER BY ORDER BY
hp.sc_hot DESC, hp.id DESC hp.sc_hot DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2324,6 +2348,7 @@ BEGIN ...@@ -2324,6 +2348,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp
ORDER BY ORDER BY
hp.id DESC hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2416,6 +2441,7 @@ BEGIN ...@@ -2416,6 +2441,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp
ORDER BY ORDER BY
hp.promoted DESC, hp.id DESC hp.promoted DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2513,6 +2539,7 @@ BEGIN ...@@ -2513,6 +2539,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp
ORDER BY ORDER BY
(hp.payout + hp.pending_payout) DESC, hp.id DESC (hp.payout + hp.pending_payout) DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2606,6 +2633,7 @@ BEGIN ...@@ -2606,6 +2633,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp
ORDER BY ORDER BY
(hp.payout + hp.pending_payout) DESC, hp.id DESC (hp.payout + hp.pending_payout) DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
...@@ -2693,6 +2721,7 @@ BEGIN ...@@ -2693,6 +2721,7 @@ BEGIN
LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp LATERAL hivemind_app.get_post_view_by_id(all_posts.id) hp
ORDER BY ORDER BY
(hp.payout + hp.pending_payout) DESC, hp.id DESC (hp.payout + hp.pending_payout) DESC, hp.id DESC
LIMIT _limit
) row ) row
); );
......
...@@ -90,6 +90,7 @@ BEGIN ...@@ -90,6 +90,7 @@ BEGIN
FROM comments, FROM comments,
LATERAL hivemind_app.get_post_view_by_id(comments.id) hp LATERAL hivemind_app.get_post_view_by_id(comments.id) hp
ORDER BY comments.cashout_time ASC, comments.id ASC ORDER BY comments.cashout_time ASC, comments.id ASC
LIMIT _limit
) row ) row
) )
) )
...@@ -200,6 +201,7 @@ BEGIN ...@@ -200,6 +201,7 @@ BEGIN
FROM comments, FROM comments,
LATERAL hivemind_app.get_post_view_by_id(comments.id) hp LATERAL hivemind_app.get_post_view_by_id(comments.id) hp
ORDER BY comments.id ORDER BY comments.id
LIMIT _limit
) row ) row
) )
) )
...@@ -309,6 +311,7 @@ BEGIN ...@@ -309,6 +311,7 @@ BEGIN
FROM comments, FROM comments,
LATERAL hivemind_app.get_post_view_by_id(comments.id) hp LATERAL hivemind_app.get_post_view_by_id(comments.id) hp
ORDER BY comments.updated_at DESC, comments.id ASC ORDER BY comments.updated_at DESC, comments.id ASC
LIMIT _limit
) row ) row
) )
) )
...@@ -418,6 +421,7 @@ BEGIN ...@@ -418,6 +421,7 @@ BEGIN
FROM comments, FROM comments,
LATERAL hivemind_app.get_post_view_by_id(comments.id) hp LATERAL hivemind_app.get_post_view_by_id(comments.id) hp
ORDER BY comments.updated_at DESC, comments.id ASC ORDER BY comments.updated_at DESC, comments.id ASC
LIMIT _limit
) row ) row
) )
) )
...@@ -522,6 +526,7 @@ BEGIN ...@@ -522,6 +526,7 @@ BEGIN
FROM comments, FROM comments,
LATERAL hivemind_app.get_post_view_by_id(comments.id) hp LATERAL hivemind_app.get_post_view_by_id(comments.id) hp
ORDER BY hp.author, hp.permlink ORDER BY hp.author, hp.permlink
LIMIT _limit
) row ) row
) )
) )
......
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