Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
with post id index
Nested Loop Left Join (cost=5443.37..5703.59 rows=58 width=537) (actual time=724.379..740.430 rows=100 loops=1)
-> Nested Loop Left Join (cost=5443.09..5581.19 rows=58 width=225) (actual time=724.322..737.715 rows=100 loops=1)
-> Limit (cost=5442.51..5449.18 rows=58 width=48) (actual time=724.291..736.657 rows=100 loops=1)
-> Gather Merge (cost=5442.51..5449.18 rows=58 width=48) (actual time=724.290..736.637 rows=100 loops=1)
Workers Planned: 1
Workers Launched: 1
-> Sort (cost=4442.50..4442.65 rows=58 width=48) (actual time=714.791..714.805 rows=84 loops=2)
Sort Key: post.scheduled_date DESC
Sort Method: top-N heapsort Memory: 44kB
Worker 0: Sort Method: top-N heapsort Memory: 50kB
-> Nested Loop (cost=1425.87..4440.80 rows=58 width=48) (actual time=59.396..713.881 rows=1039 loops=2)
Join Filter: (post.id = vote.post_id)
-> Merge Join (cost=1425.44..2021.85 rows=990 width=52) (actual time=59.178..90.150 rows=7834 loops=2)
Merge Cond: (content_post_1.post_id = post.id)
-> Parallel Index Only Scan using index6 on content_post content_post_1 (cost=0.29..530.52 rows=14607 width=4) (actual time=0.573..11.018 rows=10905 loops=2)
Heap Fetches: 21027
-> Sort (cost=1425.12..1435.43 rows=4125 width=48) (actual time=58.562..66.696 rows=16325 loops=2)
Sort Key: post.id
Sort Method: quicksort Memory: 2487kB
Worker 0: Sort Method: quicksort Memory: 2487kB
-> Index Scan using index5 on post (cost=26.48..1177.41 rows=4125 width=48) (actual time=0.275..42.504 rows=16325 loops=2)
Index Cond: (scheduled_date <= '2019-06-19 00:00:00'::timestamp without time zone)
Filter: ((parent_post_id IS NULL) AND (NOT (hashed SubPlan 1)))
Rows Removed by Filter: 3089
SubPlan 1
-> Seq Scan on blocked_user (cost=0.00..26.18 rows=4 width=28) (actual time=0.074..0.223 rows=1 loops=2)
Filter: (((user_id)::text = 'snaildragon'::text) OR ((user_id)::text = ANY ('{IBS7ftMAytR3HpMCtk3jzixnuIk1,78c4CKECYWSVt3RmOIgA0U6x7Z12,fjHvzaoyr2OvW2SoWQeB3w5tGQB2}'::text[])))
Rows Removed by Filter: 671
-> Index Scan using index4 on vote (cost=0.42..2.43 rows=1 width=4) (actual time=0.061..0.079 rows=0 loops=15669)
Index Cond: (post_id = content_post_1.post_id)
Filter: ((vote > 15) AND ((user_id)::text = ANY ('{IBS7ftMAytR3HpMCtk3jzixnuIk1,78c4CKECYWSVt3RmOIgA0U6x7Z12,fjHvzaoyr2OvW2SoWQeB3w5tGQB2}'::text[])))
Rows Removed by Filter: 30
-> Nested Loop (cost=0.57..2.26 rows=1 width=177) (actual time=0.009..0.009 rows=1 loops=100)
-> Index Scan using index6 on content_post content_post_2 (cost=0.29..1.91 rows=1 width=28) (actual time=0.004..0.004 rows=1 loops=100)
Index Cond: (post.id = post_id)
-> Index Scan using content_pkey on content content_1 (cost=0.29..0.35 rows=1 width=149) (actual time=0.004..0.004 rows=1 loops=100)
Index Cond: (id = content_post_2.content_id)
-> Index Scan using user_pkey on "user" user_1 (cost=0.28..2.11 rows=1 width=304) (actual time=0.026..0.026 rows=1 loops=100)
Index Cond: ((id)::text = (post.user_id)::text)
Planning Time: 1.397 ms
Execution Time: 740.644 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.