explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oJqi

Settings
# exclusive inclusive rows x rows loops node
1. 15.826 56.872 ↑ 3.4 5,000 1

Hash Join (cost=2,344.38..4,137.71 rows=16,832 width=748) (actual time=23.931..56.872 rows=5,000 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, p
  • Hash Cond: ("*VALUES*".column1 = projects.id)
  • Buffers: shared hit=3506
2. 17.680 17.680 ↑ 1.0 100,001 1

Values Scan on "*VALUES*" (cost=0.00..1,250.01 rows=100,001 width=4) (actual time=0.006..17.680 rows=100,001 loops=1)

  • Output: "*VALUES*".column1
3. 7.865 23.366 ↑ 3.4 5,000 1

Hash (cost=2,133.98..2,133.98 rows=16,832 width=748) (actual time=23.366..23.366 rows=5,000 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
  • Buckets: 32768 Batches: 1 Memory Usage: 1496kB
  • Buffers: shared hit=3506
4. 4.806 15.501 ↑ 3.4 5,000 1

Nested Loop (cost=71.36..2,133.98 rows=16,832 width=748) (actual time=0.323..15.501 rows=5,000 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_ac
  • Buffers: shared hit=3506
5. 0.013 0.265 ↑ 3.4 5 1

HashAggregate (cost=70.94..71.11 rows=17 width=4) (actual time=0.256..0.265 rows=5 loops=1)

  • Output: namespaces.id
  • Group Key: namespaces.id
  • Buffers: shared hit=6
6. 0.252 0.252 ↑ 3.4 5 1

CTE Scan on base_and_descendants namespaces (cost=70.39..70.73 rows=17 width=4) (actual time=0.146..0.252 rows=5 loops=1)

  • Output: namespaces.id
  • Buffers: shared hit=6
7.          

CTE base_and_descendants

8. 0.055 0.245 ↑ 3.4 5 1

Recursive Union (cost=9.73..70.39 rows=17 width=309) (actual time=0.143..0.245 rows=5 loops=1)

  • Buffers: shared hit=6
9. 0.049 0.142 ↑ 1.4 5 1

Hash Join (cost=9.73..13.18 rows=7 width=309) (actual time=0.097..0.142 rows=5 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.
  • Hash Cond: (namespaces_1.id = geo_node_namespace_links.namespace_id)
  • Buffers: shared hit=4
10. 0.041 0.041 ↑ 1.0 101 1

Seq Scan on public.namespaces namespaces_1 (cost=0.00..3.02 rows=102 width=309) (actual time=0.015..0.041 rows=101 loops=1)

  • Output: namespaces_1.id, namespaces_1.name, namespaces_1.path, namespaces_1.owner_id, namespaces_1.created_at, namespaces_1.updated_at, namespa
  • Buffers: shared hit=2
11. 0.012 0.052 ↑ 1.4 5 1

Hash (cost=9.65..9.65 rows=7 width=4) (actual time=0.052..0.052 rows=5 loops=1)

  • Output: geo_node_namespace_links.namespace_id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=2
12. 0.040 0.040 ↑ 1.4 5 1

Bitmap Heap Scan on public.geo_node_namespace_links (cost=2.21..9.65 rows=7 width=4) (actual time=0.040..0.040 rows=5 loops=1)

  • Output: geo_node_namespace_links.namespace_id
  • Recheck Cond: (geo_node_namespace_links.geo_node_id = 2)
  • Heap Blocks: exact=1
  • Buffers: shared hit=2
  • -> Bitmap Index Scan on index_geo_node_namespace_links_on_geo_node_id (cost=0.00..2.21 rows=7 width=0) (actual time=0.029..0.029 rows=5
  • Index Cond: (geo_node_namespace_links.geo_node_id = 2)
  • Buffers: shared hit=1
13. 0.028 0.048 ↓ 0.0 0 1

Hash Join (cost=2.28..5.69 rows=1 width=309) (actual time=0.048..0.048 rows=0 loops=1)

  • Output: namespaces_2.id, namespaces_2.name, namespaces_2.path, namespaces_2.owner_id, namespaces_2.created_at, namespaces_2.updated_at, namespaces_2.
  • Hash Cond: (namespaces_2.parent_id = base_and_descendants.id)
  • Buffers: shared hit=2
14. 0.013 0.013 ↑ 1.0 101 1

Seq Scan on public.namespaces namespaces_2 (cost=0.00..3.02 rows=102 width=309) (actual time=0.004..0.013 rows=101 loops=1)

  • Output: namespaces_2.id, namespaces_2.name, namespaces_2.path, namespaces_2.owner_id, namespaces_2.created_at, namespaces_2.updated_at, namespa
  • Buffers: shared hit=2
15. 0.004 0.007 ↑ 14.0 5 1

Hash (cost=1.40..1.40 rows=70 width=4) (actual time=0.007..0.007 rows=5 loops=1)

  • Output: base_and_descendants.id
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
16. 0.003 0.003 ↑ 14.0 5 1

WorkTable Scan on base_and_descendants (cost=0.00..1.40 rows=70 width=4) (actual time=0.001..0.003 rows=5 loops=1)

  • Output: base_and_descendants.id
17. 10.430 10.430 ↓ 1.0 1,000 5

Index Scan using index_projects_on_namespace_id on public.projects (cost=0.42..111.44 rows=990 width=748) (actual time=0.036..2.086 rows=1,000 loops=5)

  • Output: projects.id, projects.name, projects.path, projects.description, projects.created_at, projects.updated_at, projects.creator_id, projects.namespace_id, projects.l
  • Index Cond: (projects.namespace_id = namespaces.id)
  • Buffers: shared hit=3500