explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8C7T

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=288,459.87..288,460.14 rows=12 width=553) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Unique (cost=288,459.87..293,311.59 rows=215,632 width=553) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=288,459.87..288,998.95 rows=215,632 width=553) (actual rows= loops=)

  • Sort Key: posts.taken_at DESC, posts.id, posts.shortcode, posts.likes_count, posts.comments_count, posts.engagement_percentage, profiles.username, captions.text
4. 0.000 0.000 ↓ 0.0

Gather (cost=29,446.86..161,745.80 rows=215,632 width=553) (actual rows= loops=)

  • Workers Planned: 2
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=28,446.86..139,182.60 rows=89,847 width=553) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Parallel Hash Join (cost=28,446.44..46,775.13 rows=89,847 width=49) (actual rows= loops=)

  • Hash Cond: (posts.profile_id = profiles.id)
7. 0.000 0.000 ↓ 0.0

Parallel Hash Join (cost=9,814.63..27,907.46 rows=89,847 width=43) (actual rows= loops=)

  • Hash Cond: (posts.id = hashtags_posts.post_id)
8. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on posts (cost=0.00..16,884.34 rows=222,434 width=43) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=8,691.54..8,691.54 rows=89,847 width=8) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on hashtags_posts (cost=0.00..8,691.54 rows=89,847 width=8) (actual rows= loops=)

  • Filter: (hashtag_id = ANY ('{2,1}'::bigint[]))
11. 0.000 0.000 ↓ 0.0

Parallel Hash (cost=17,743.58..17,743.58 rows=71,058 width=22) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on profiles (cost=0.00..17,743.58 rows=71,058 width=22) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Index Scan using idx_captions_post_id on captions (cost=0.42..1.02 rows=1 width=512) (actual rows= loops=)

  • Index Cond: (post_id = posts.id)