explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BMog7

Settings
# exclusive inclusive rows x rows loops node
1. 0.078 4.329 ↑ 1.0 1 1

Aggregate (cost=1,096.76..1,096.77 rows=1 width=8) (actual time=4.329..4.329 rows=1 loops=1)

  • Buffers: shared hit=393
2. 1.140 4.251 ↑ 40.9 143 1

Hash Join (cost=759.78..1,082.14 rows=5,850 width=4) (actual time=2.030..4.251 rows=143 loops=1)

  • Hash Cond: (design_management_designs.project_id = projects.id)
  • Buffers: shared hit=393
3. 1.120 1.120 ↑ 1.0 11,699 1

Seq Scan on design_management_designs (cost=0.00..219.99 rows=11,699 width=4) (actual time=0.011..1.120 rows=11,699 loops=1)

  • Buffers: shared hit=103
4. 0.017 1.991 ↑ 37.7 53 1

Hash (cost=734.78..734.78 rows=2,000 width=4) (actual time=1.991..1.991 rows=53 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 18kB
  • Buffers: shared hit=290
5. 0.863 1.974 ↑ 37.7 53 1

Hash Join (cost=408.03..734.78 rows=2,000 width=4) (actual time=0.585..1.974 rows=53 loops=1)

  • Hash Cond: (projects.namespace_id = gitlab_secondary_namespaces.id)
  • Buffers: shared hit=290
6. 0.574 0.574 ↓ 1.0 4,001 1

Seq Scan on projects (cost=0.00..294.00 rows=4,000 width=8) (actual time=0.004..0.574 rows=4,001 loops=1)

  • Buffers: shared hit=254
7. 0.006 0.537 ↑ 11.8 17 1

Hash (cost=405.53..405.53 rows=200 width=4) (actual time=0.537..0.537 rows=17 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=36
8. 0.014 0.531 ↑ 11.8 17 1

HashAggregate (cost=403.53..405.53 rows=200 width=4) (actual time=0.528..0.531 rows=17 loops=1)

  • Group Key: gitlab_secondary_namespaces.id
  • Buffers: shared hit=36
9. 0.517 0.517 ↑ 59.8 17 1

CTE Scan on base_and_descendants gitlab_secondary_namespaces (cost=370.47..390.81 rows=1,017 width=4) (actual time=0.021..0.517 rows=17 loops=1)

  • Buffers: shared hit=36
10.          

CTE base_and_descendants

11. 0.017 0.508 ↑ 59.8 17 1

Recursive Union (cost=2.21..370.47 rows=1,017 width=4) (actual time=0.019..0.508 rows=17 loops=1)

  • Buffers: shared hit=36
12. 0.008 0.015 ↓ 1.7 12 1

Bitmap Heap Scan on geo_node_namespace_links (cost=2.21..9.65 rows=7 width=4) (actual time=0.013..0.015 rows=12 loops=1)

  • Recheck Cond: (geo_node_id = 2)
  • Heap Blocks: exact=1
  • Buffers: shared hit=2
13. 0.007 0.007 ↓ 1.7 12 1

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.007..0.007 rows=12 loops=1)

  • Index Cond: (geo_node_id = 2)
  • Buffers: shared hit=1
14. 0.250 0.476 ↑ 50.5 2 2

Hash Join (cost=2.28..34.05 rows=101 width=4) (actual time=0.182..0.238 rows=2 loops=2)

  • Hash Cond: (namespaces.parent_id = base_and_descendants.id)
  • Buffers: shared hit=34
15. 0.216 0.216 ↓ 1.0 1,004 2

Seq Scan on namespaces (cost=0.00..27.01 rows=1,001 width=8) (actual time=0.005..0.108 rows=1,004 loops=2)

  • Buffers: shared hit=34
16. 0.008 0.010 ↑ 8.8 8 2

Hash (cost=1.40..1.40 rows=70 width=4) (actual time=0.005..0.005 rows=8 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.002 0.002 ↑ 8.8 8 2

WorkTable Scan on base_and_descendants (cost=0.00..1.40 rows=70 width=4) (actual time=0.000..0.001 rows=8 loops=2)

Planning time : 1.211 ms
Execution time : 4.617 ms