explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.026 2,654.100 ↑ 1.0 1 1

Sort (cost=1,800,735.95..1,800,735.96 rows=1 width=1,244) (actual time=2,654.100..2,654.100 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=1644560
2. 0.008 2,654.074 ↑ 1.0 1 1

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

  • Buffers: shared hit=1644554
3. 0.000 2,654.030 ↑ 1.0 1 1

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

  • Group Key: parent.id
  • Buffers: shared hit=1644549
4. 557.546 3,206.747 ↓ 4.0 4 1

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

  • Workers Planned: 7
  • Workers Launched: 7
  • Buffers: shared hit=1644549
5. 1,211.886 2,649.201 ↓ 0.0 0 8 / 8

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

  • Hash Cond: (children.parent_id = parent.id)
  • Buffers: shared hit=1644549
6. 1,437.164 1,437.164 ↑ 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,437.164 rows=10,772,074 loops=8)

  • Buffers: shared hit=1644305
7. 0.002 0.151 ↑ 1.0 1 8 / 8

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=55
8. 0.149 0.149 ↑ 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.148..0.149 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.036 0.036 ↑ 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.036..0.036 rows=1 loops=1)

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