explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zy36X

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

CTE Scan on base_and_ancestors namespaces (cost=25,282.57..25,303.61 rows=1,052 width=12) (actual time=0.091..0.091 rows=0 loops=1)

  • Buffers: shared hit=2
2.          

CTE base_and_ancestors

3. 0.000 0.090 ↓ 0.0 0 1

Recursive Union (cost=837.49..25,282.57 rows=1,052 width=322) (actual time=0.090..0.090 rows=0 loops=1)

  • Buffers: shared hit=2
4. 0.001 0.088 ↓ 0.0 0 1

Nested Loop (cost=837.49..2,052.53 rows=52 width=322) (actual time=0.087..0.088 rows=0 loops=1)

  • Buffers: shared hit=2
5. 0.087 0.087 ↓ 0.0 0 1

CTE Scan on base_and_descendants epics_2 (cost=837.06..842.48 rows=271 width=4) (actual time=0.087..0.087 rows=0 loops=1)

  • Buffers: shared hit=2
6.          

CTE base_and_descendants

7. 0.002 0.087 ↓ 0.0 0 1

Recursive Union (cost=0.29..837.06 rows=271 width=779) (actual time=0.087..0.087 rows=0 loops=1)

  • Buffers: shared hit=2
8. 0.083 0.083 ↓ 0.0 0 1

Index Scan using epics_pkey on public.epics (cost=0.29..4.30 rows=1 width=779) (actual time=0.083..0.083 rows=0 loops=1)

  • Index Cond: (epics.id = 15413)
  • Buffers: shared hit=2
9. 0.000 0.002 ↓ 0.0 0 1

Nested Loop (cost=0.29..82.73 rows=27 width=779) (actual time=0.002..0.002 rows=0 loops=1)

10. 0.002 0.002 ↓ 0.0 0 1

WorkTable Scan on base_and_descendants (cost=0.00..0.20 rows=10 width=4) (actual time=0.002..0.002 rows=0 loops=1)

11. 0.000 0.000 ↓ 0.0 0 0

Index Scan using index_epics_on_parent_id on public.epics epics_1 (cost=0.29..8.22 rows=3 width=779) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: (epics_1.parent_id = base_and_descendants.id)
12. 0.000 0.000 ↓ 0.0 0 0

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

  • Index Cond: (namespaces_1.id = epics_2.group_id)
  • Filter: ((namespaces_1.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0
13. 0.001 0.002 ↓ 0.0 0 1

Nested Loop (cost=0.43..2,320.90 rows=100 width=322) (actual time=0.002..0.002 rows=0 loops=1)

14. 0.001 0.001 ↓ 0.0 0 1

WorkTable Scan on base_and_ancestors (cost=0.00..10.40 rows=520 width=4) (actual time=0.001..0.001 rows=0 loops=1)

15. 0.000 0.000 ↓ 0.0 0 0

Index Scan using namespaces_pkey on public.namespaces namespaces_2 (cost=0.43..4.43 rows=1 width=322) (actual time=0.000..0.000 rows=0 loops=0)

  • Index Cond: (namespaces_2.id = base_and_ancestors.parent_id)
  • Filter: ((namespaces_2.type)::text = 'Group'::text)
  • Rows Removed by Filter: 0