explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KbZW

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 1.175 ↓ 2.0 63 1

Hash Join (cost=1,287.62..1,506.20 rows=32 width=829) (actual time=0.362..1.175 rows=63 loops=1)

  • Output: projects.id, projects.name, projects.path, projects.description, projects.created_at, projects.updated_at, projects.creator_id, projects.namespace_id, projects.last_activity_at, projects.import_url, projects.visibility_level, p
  • Hash Cond: (projects.namespace_id = namespaces.id)
  • Buffers: shared hit=293
2. 0.051 0.823 ↑ 1.0 63 1

Nested Loop (cost=0.43..218.77 rows=63 width=829) (actual time=0.036..0.823 rows=63 loops=1)

  • Output: projects.id, projects.name, projects.path, projects.description, projects.created_at, projects.updated_at, projects.creator_id, projects.namespace_id, projects.last_activity_at, projects.import_url, projects.visibility_le
  • Buffers: shared hit=253
3. 0.016 0.016 ↑ 1.0 63 1

Values Scan on "*VALUES*" (cost=0.00..0.79 rows=63 width=4) (actual time=0.004..0.016 rows=63 loops=1)

  • Output: "*VALUES*".column1
4. 0.756 0.756 ↑ 1.0 1 63

Index Scan using projects_pkey on public.projects (cost=0.43..3.45 rows=1 width=829) (actual time=0.012..0.012 rows=1 loops=63)

  • Output: projects.id, projects.name, projects.path, projects.description, projects.created_at, projects.updated_at, projects.creator_id, projects.namespace_id, projects.last_activity_at, projects.import_url, projects.visibil
  • Index Cond: (projects.id = "*VALUES*".column1)
  • Buffers: shared hit=253
5. 0.012 0.306 ↑ 28.6 7 1

Hash (cost=1,284.69..1,284.69 rows=200 width=4) (actual time=0.306..0.306 rows=7 loops=1)

  • Output: namespaces.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=40
6. 0.010 0.294 ↑ 28.6 7 1

HashAggregate (cost=1,282.69..1,284.69 rows=200 width=4) (actual time=0.293..0.294 rows=7 loops=1)

  • Output: namespaces.id
  • Group Key: namespaces.id
  • Buffers: shared hit=40
7. 0.284 0.284 ↑ 105.9 7 1

CTE Scan on base_and_descendants namespaces (cost=1,258.61..1,273.43 rows=741 width=4) (actual time=0.047..0.284 rows=7 loops=1)

  • Output: namespaces.id
  • Buffers: shared hit=40
8.          

CTE base_and_descendants

9. 0.033 0.274 ↑ 105.9 7 1

Recursive Union (cost=0.56..1,258.61 rows=741 width=278) (actual time=0.043..0.274 rows=7 loops=1)

  • Buffers: shared hit=40
10. 0.001 0.025 ↑ 1.0 1 1

Nested Loop (cost=0.56..5.10 rows=1 width=278) (actual time=0.024..0.025 rows=1 loops=1)

  • Output: namespaces_1.id, namespaces_1.name, namespaces_1.path, namespaces_1.owner_id, namespaces_1.created_at, namespaces_1.updated_at, namespaces_1.type, namespaces_1.description, namespaces_1.avatar, n
  • Buffers: shared hit=6
11. 0.008 0.008 ↑ 1.0 1 1

Index Only Scan using index_geo_node_namespace_links_on_geo_node_id_and_namespace_id on public.geo_node_namespace_links (cost=0.12..1.64 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1)

  • Output: geo_node_namespace_links.geo_node_id, geo_node_namespace_links.namespace_id
  • Index Cond: (geo_node_namespace_links.geo_node_id = 100046)
  • Heap Fetches: 0
  • Buffers: shared hit=2
12. 0.016 0.016 ↑ 1.0 1 1

Index Scan using namespaces_pkey on public.namespaces namespaces_1 (cost=0.43..3.45 rows=1 width=278) (actual time=0.015..0.016 rows=1 loops=1)

  • Output: namespaces_1.id, namespaces_1.name, namespaces_1.path, namespaces_1.owner_id, namespaces_1.created_at, namespaces_1.updated_at, namespaces_1.type, namespaces_1.description, namespaces_1.ava
  • Index Cond: (namespaces_1.id = geo_node_namespace_links.namespace_id)
  • Buffers: shared hit=4
13. 0.006 0.216 ↑ 37.0 2 3

Nested Loop (cost=0.56..123.87 rows=74 width=278) (actual time=0.026..0.072 rows=2 loops=3)

  • Output: namespaces_2.id, namespaces_2.name, namespaces_2.path, namespaces_2.owner_id, namespaces_2.created_at, namespaces_2.updated_at, namespaces_2.type, namespaces_2.description, namespaces_2.avatar, n
  • Buffers: shared hit=34
14. 0.000 0.000 ↑ 5.0 2 3

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

  • Output: base_and_descendants.id, base_and_descendants.name, base_and_descendants.path, base_and_descendants.owner_id, base_and_descendants.created_at, base_and_descendants.updated_at, base_and_desc
15. 0.210 0.210 ↑ 7.0 1 7

Index Scan using index_namespaces_on_parent_id_and_id on public.namespaces namespaces_2 (cost=0.56..12.30 rows=7 width=278) (actual time=0.028..0.030 rows=1 loops=7)

  • Output: namespaces_2.id, namespaces_2.name, namespaces_2.path, namespaces_2.owner_id, namespaces_2.created_at, namespaces_2.updated_at, namespaces_2.type, namespaces_2.description, namespaces_2.ava
  • Index Cond: (namespaces_2.parent_id = base_and_descendants.id)
  • Buffers: shared hit=34