explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bBn7

Settings
# exclusive inclusive rows x rows loops node
1. 34,768.150 34,768.150 ↑ 5.7 92 1

CTE Scan on base_and_descendants (cost=44,894.61..44,905.03 rows=521 width=8) (actual time=0.378..34,768.150 rows=92 loops=1)

2.          

CTE base_and_descendants

3. 0.430 34,767.989 ↑ 5.7 92 1

Recursive Union (cost=0.42..44,894.61 rows=521 width=8) (actual time=0.376..34,767.989 rows=92 loops=1)

4. 0.374 0.374 ↑ 1.0 1 1

Index Scan using namespaces_pkey on namespaces (cost=0.42..8.44 rows=1 width=8) (actual time=0.373..0.374 rows=1 loops=1)

  • Index Cond: (id = 9970)
  • Filter: ((parent_id IS NULL) AND ((type)::text = 'Group'::text))
5. 763.690 34,767.185 ↑ 2.9 18 5

Hash Join (cost=0.74..4,487.58 rows=52 width=8) (actual time=2,277.900..6,953.437 rows=18 loops=5)

  • Hash Cond: (namespaces_1.parent_id = base_and_descendants_1.id)
6. 34,003.420 34,003.420 ↓ 1,174.1 1,232,767 5

Index Scan using index_namespaces_on_type_partial on namespaces namespaces_1 (cost=0.42..4,482.79 rows=1,050 width=8) (actual time=0.443..6,800.684 rows=1,232,767 loops=5)

  • Index Cond: ((type)::text = 'Group'::text)
7. 0.040 0.075 ↓ 1.8 18 5

Hash (cost=0.20..0.20 rows=10 width=8) (actual time=0.015..0.015 rows=18 loops=5)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.035 0.035 ↓ 1.8 18 5

WorkTable Scan on base_and_descendants base_and_descendants_1 (cost=0.00..0.20 rows=10 width=8) (actual time=0.002..0.007 rows=18 loops=5)

Planning time : 0.487 ms
Execution time : 34,768.286 ms