explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uYSh

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 0.300 ↓ 0.0 0 1

Nested Loop (cost=454.23..547.52 rows=1 width=259) (actual time=0.300..0.300 rows=0 loops=1)

  • Buffers: shared hit=63
2. 0.008 0.240 ↑ 2.3 9 1

HashAggregate (cost=453.81..454.01 rows=21 width=4) (actual time=0.240..0.240 rows=9 loops=1)

  • Group Key: namespaces.id
  • Buffers: shared hit=36
3. 0.232 0.232 ↑ 2.3 9 1

CTE Scan on base_and_ancestors namespaces (cost=453.12..453.54 rows=21 width=4) (actual time=0.067..0.232 rows=9 loops=1)

  • Buffers: shared hit=36
4.          

CTE base_and_ancestors

5. 0.058 0.216 ↑ 2.3 9 1

Recursive Union (cost=0.43..453.12 rows=21 width=323) (actual time=0.065..0.216 rows=9 loops=1)

  • Buffers: shared hit=36
6. 0.041 0.041 ↑ 1.0 1 1

Index Scan using namespaces_pkey on public.namespaces namespaces_1 (cost=0.43..4.45 rows=1 width=323) (actual time=0.041..0.041 rows=1 loops=1)

  • Index Cond: (namespaces_1.id = 3884680)
  • Filter: ((namespaces_1.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=4
7. 0.009 0.117 ↑ 2.0 1 9

Nested Loop (cost=0.43..44.83 rows=2 width=323) (actual time=0.013..0.013 rows=1 loops=9)

  • Buffers: shared hit=32
8. 0.009 0.009 ↑ 10.0 1 9

WorkTable Scan on base_and_ancestors (cost=0.00..0.20 rows=10 width=4) (actual time=0.001..0.001 rows=1 loops=9)

9. 0.099 0.099 ↑ 1.0 1 9

Index Scan using namespaces_pkey on public.namespaces namespaces_2 (cost=0.43..4.45 rows=1 width=323) (actual time=0.011..0.011 rows=1 loops=9)

  • Index Cond: (namespaces_2.id = base_and_ancestors.parent_id)
  • Filter: ((namespaces_2.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=32
10. 0.054 0.054 ↓ 0.0 0 9

Index Scan using i1 on public.web_hooks (cost=0.42..4.44 rows=1 width=259) (actual time=0.006..0.006 rows=0 loops=9)

  • Index Cond: (web_hooks.group_id = namespaces.id)
  • Filter: ((web_hooks.type)::text = 'GroupHook'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=27