explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x6bs

Settings
# exclusive inclusive rows x rows loops node
1. 0.337 6.709 ↓ 2.0 2 1

Hash Join (cost=454.44..2,752.00 rows=1 width=259) (actual time=0.833..6.709 rows=2 loops=1)

  • Hash Cond: (web_hooks.group_id = namespaces.id)
  • Buffers: shared hit=2907
2. 6.282 6.282 ↓ 1.0 3,053 1

Index Scan using index_web_hooks_on_type on public.web_hooks (cost=0.42..2,290.14 rows=2,989 width=259) (actual time=0.029..6.282 rows=3,053 loops=1)

  • Index Cond: ((web_hooks.type)::text = 'GroupHook'::text)
  • Buffers: shared hit=2895
3. 0.004 0.090 ↑ 7.0 3 1

Hash (cost=453.75..453.75 rows=21 width=4) (actual time=0.090..0.090 rows=3 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=12
4. 0.086 0.086 ↑ 7.0 3 1

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

  • Buffers: shared hit=12
5.          

CTE base_and_ancestors

6. 0.029 0.080 ↑ 7.0 3 1

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

  • Buffers: shared hit=12
7. 0.015 0.015 ↑ 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.014..0.015 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
8. 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
9. 0.003 0.003 ↑ 10.0 1 3

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

10. 0.030 0.030 ↑ 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.010..0.010 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