explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gDd

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 0.162 ↓ 2.0 2 1

Nested Loop (cost=454.08..524.47 rows=1 width=259) (actual time=0.148..0.162 rows=2 loops=1)

  • Buffers: shared hit=20
2. 0.005 0.093 ↑ 7.0 3 1

HashAggregate (cost=453.81..454.01 rows=21 width=4) (actual time=0.092..0.093 rows=3 loops=1)

  • Group Key: namespaces.id
  • Buffers: shared hit=12
3. 0.088 0.088 ↑ 7.0 3 1

CTE Scan on base_and_ancestors namespaces (cost=453.12..453.54 rows=21 width=4) (actual time=0.040..0.088 rows=3 loops=1)

  • Buffers: shared hit=12
4.          

CTE base_and_ancestors

5. 0.030 0.082 ↑ 7.0 3 1

Recursive Union (cost=0.43..453.12 rows=21 width=323) (actual time=0.037..0.082 rows=3 loops=1)

  • Buffers: shared hit=12
6. 0.016 0.016 ↑ 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.016..0.016 rows=1 loops=1)

  • Index Cond: (namespaces_1.id = 4006638)
  • Filter: ((namespaces_1.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=4
7. 0.003 0.036 ↑ 2.0 1 3

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

  • Buffers: shared hit=8
8. 0.000 0.000 ↑ 10.0 1 3

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

9. 0.033 0.033 ↑ 1.0 1 3

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=3)

  • 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=8
10. 0.066 0.066 ↑ 1.0 1 3

Index Scan using i2 on public.web_hooks (cost=0.28..3.35 rows=1 width=259) (actual time=0.018..0.022 rows=1 loops=3)

  • Index Cond: (web_hooks.group_id = namespaces.id)
  • Buffers: shared hit=8