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

Merge branch 'mi_slow_get_ranked_post' into 'develop'

Mi slow get ranked post

See merge request !344
parents ebdc2e99 43c653ac
No related branches found
No related tags found
2 merge requests!456Release candidate v1 24,!344Mi slow get ranked post
......@@ -55,7 +55,8 @@ BEGIN
JOIN hive_posts hp1 ON hp1.id = hpt.post_id
JOIN hive_accounts_view ha ON hp1.author_id = ha.id
WHERE hpt.tag_id = __hive_tag AND hp1.counter_deleted = 0 AND hp1.depth = 0 AND NOT ha.is_grayed AND ( __post_id = 0 OR hp1.id < __post_id )
ORDER BY hp1.id + 0 DESC
--ORDER BY hp1.id + 0 DESC -- this workaround helped the query to better choose indexes, but after some time it started to significally slow down
ORDER BY hp1.id DESC
LIMIT _limit
) as created
JOIN hive_posts_view hp ON hp.id = created.id
......
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