explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ogVF : Optimization for: Optimization for: Optimization for: plan #YdC4; plan #wIy; plan #1PtY

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.039 2,661.229 ↑ 1.0 1 1

Sort (cost=1,800,735.95..1,800,735.96 rows=1 width=1,244) (actual time=2,661.229..2,661.229 rows=1 loops=1)

  • Sort Key: hive_posts_cache.created_at DESC, hive_posts_cache.post_id
  • Sort Method: quicksort Memory: 27kB
  • Buffers: shared hit=1644665
2. 0.008 2,661.190 ↑ 1.0 1 1

Nested Loop (cost=1,800,733.92..1,800,735.94 rows=1 width=1,244) (actual time=2,661.189..2,661.190 rows=1 loops=1)

  • Buffers: shared hit=1644659
3. 0.000 2,661.139 ↑ 1.0 1 1

HashAggregate (cost=1,800,733.35..1,800,733.36 rows=1 width=8) (actual time=2,661.138..2,661.139 rows=1 loops=1)

  • Group Key: parent.id
  • Buffers: shared hit=1644654
4. 594.081 3,249.906 ↓ 4.0 4 1

Gather (cost=1,002.73..1,800,733.35 rows=1 width=8) (actual time=2,632.550..3,249.906 rows=4 loops=1)

  • Workers Planned: 7
  • Workers Launched: 7
  • Buffers: shared hit=1644654
5. 1,194.161 2,655.825 ↓ 0.0 0 8 / 8

Hash Join (cost=2.73..1,799,733.25 rows=1 width=8) (actual time=2,490.873..2,655.825 rows=0 loops=8)

  • Hash Cond: (children.parent_id = parent.id)
  • Buffers: shared hit=1644654
6. 1,461.510 1,461.510 ↑ 1.1 10,772,074 8 / 8

Parallel Seq Scan on hive_posts children (cost=0.00..1,767,414.32 rows=12,310,932 width=4) (actual time=0.022..1,461.510 rows=10,772,074 loops=8)

  • Buffers: shared hit=1644305
7. 0.004 0.154 ↑ 1.0 1 8 / 8

Hash (cost=2.71..2.71 rows=1 width=4) (actual time=0.154..0.154 rows=1 loops=8)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=55
8. 0.150 0.150 ↑ 1.0 1 8 / 8

Index Scan using hive_posts_author_permlink_btree on hive_posts parent (cost=0.69..2.71 rows=1 width=4) (actual time=0.150..0.150 rows=1 loops=8)

  • Index Cond: (((author)::text = 'jes2850'::text) AND ((permlink)::text = 'happy-kitty-sleepy-kitty-purr-purr-purr'::text))
  • Buffers: shared hit=55
9. 0.043 0.043 ↑ 1.0 1 1

Index Scan using hive_posts_cache_pkey on hive_posts_cache (cost=0.57..2.58 rows=1 width=1,244) (actual time=0.043..0.043 rows=1 loops=1)

  • Index Cond: (post_id = children.parent_id)
  • Buffers: shared hit=5
Planning time : 4.678 ms
Execution time : 3,250.143 ms