explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lTkS : Optimization for: plan #UDBN

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 76,341.598 76,341.598 ↑ 103.9 77 1

CTE Scan on child_posts (cost=18,369,676.91..18,369,836.93 rows=8,001 width=8) (actual time=0.131..76,341.598 rows=77 loops=1)

2.          

CTE child_posts

3. 0.151 76,341.564 ↑ 103.9 77 1

Recursive Union (cost=0.69..18,369,676.91 rows=8,001 width=8) (actual time=0.129..76,341.564 rows=77 loops=1)

4. 0.128 0.128 ↑ 1.0 1 1

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

  • Index Cond: (((author)::text = 'blocktrades'::text) AND ((permlink)::text = 'should-long-term-hive-proposals-cost-more-to-create'::text))
5. 28,458.891 76,341.285 ↑ 100.0 8 9

Hash Join (cost=0.89..1,836,951.42 rows=800 width=8) (actual time=8,461.893..8,482.365 rows=8 loops=9)

  • Hash Cond: (children.parent_id = child_posts_1.id)
6. 47,882.358 47,882.358 ↑ 1.0 67,607,965 9

Index Only Scan using hive_posts_id_parent_id_btree on hive_posts children (cost=0.57..1,582,599.20 rows=67,825,038 width=8) (actual time=0.026..5,320.262 rows=67,607,965 loops=9)

  • Index Cond: (parent_id IS NOT NULL)
  • Heap Fetches: 494267
7. 0.018 0.036 ↑ 1.1 9 9

Hash (cost=0.20..0.20 rows=10 width=4) (actual time=0.004..0.004 rows=9 loops=9)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.018 0.018 ↑ 1.1 9 9

WorkTable Scan on child_posts child_posts_1 (cost=0.00..0.20 rows=10 width=4) (actual time=0.001..0.002 rows=9 loops=9)

Planning time : 1.104 ms
Execution time : 76,341.788 ms