explain.depesz.com

PostgreSQL's explain analyze made readable

Result: z9O8

Settings
# exclusive inclusive rows x rows loops node
1. 1.574 1.574 ↑ 5.0 153 1

CTE Scan on base_and_descendants namespaces (cost=1,117.13..1,132.35 rows=761 width=2,946) (actual time=0.046..1.574 rows=153 loops=1)

  • Buffers: shared hit=761
2.          

CTE base_and_descendants

3. 0.379 1.388 ↑ 5.0 153 1

Recursive Union (cost=0.43..1,117.13 rows=761 width=357) (actual time=0.043..1.388 rows=153 loops=1)

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

Index Scan using namespaces_pkey on public.namespaces namespaces_1 (cost=0.43..3.45 rows=1 width=357) (actual time=0.023..0.024 rows=1 loops=1)

  • Index Cond: (namespaces_1.id = 9,970)
  • Buffers: shared hit=4
5. 0.047 0.985 ↑ 2.5 30 5

Nested Loop (cost=0.56..109.85 rows=76 width=357) (actual time=0.021..0.197 rows=30 loops=5)

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

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

7. 0.918 0.918 ↑ 8.0 1 153

Index Scan using index_namespaces_on_parent_id_and_id on public.namespaces namespaces_2 (cost=0.56..10.88 rows=8 width=357) (actual time=0.004..0.006 rows=1 loops=153)

  • Index Cond: (namespaces_2.parent_id = base_and_descendants.id)
  • Buffers: shared hit=757