explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e6kX

Settings
# exclusive inclusive rows x rows loops node
1. 3.104 3.104 ↓ 1.0 153 1

CTE Scan on base_and_descendants namespaces (cost=1,419.95..1,422.97 rows=151 width=2,946) (actual time=0.061..3.104 rows=153 loops=1)

  • Buffers: shared hit=761
2.          

CTE base_and_descendants

3. 0.675 2.733 ↓ 1.0 153 1

Recursive Union (cost=0.43..1,419.95 rows=151 width=347) (actual time=0.056..2.733 rows=153 loops=1)

  • Buffers: shared hit=761
4. 0.043 0.043 ↑ 1.0 1 1

Index Scan using namespaces_pkey on public.namespaces namespaces_1 (cost=0.43..3.45 rows=1 width=347) (actual time=0.042..0.043 rows=1 loops=1)

  • Index Cond: (namespaces_1.id = 9,970)
  • Filter: ((namespaces_1.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=4
5. 0.292 2.015 ↓ 2.0 30 5

Nested Loop (cost=0.56..141.35 rows=15 width=347) (actual time=0.041..0.403 rows=30 loops=5)

  • Buffers: shared hit=757
6. 0.040 0.040 ↓ 3.1 31 5

WorkTable Scan on base_and_descendants (cost=0.00..0.20 rows=10 width=4) (actual time=0.001..0.008 rows=31 loops=5)

7. 1.683 1.683 ↑ 2.0 1 153

Index Scan using index_namespaces_on_parent_id_and_id on public.namespaces namespaces_2 (cost=0.56..14.09 rows=2 width=347) (actual time=0.008..0.011 rows=1 loops=153)

  • Index Cond: (namespaces_2.parent_id = base_and_descendants.id)
  • Filter: ((namespaces_2.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=757