explain.depesz.com

PostgreSQL's explain analyze made readable

Result: c1f3

Settings
# exclusive inclusive rows x rows loops node
1. 5.533 84.039 ↑ 1.0 8,344 1

Sort (cost=3,745.23..3,766.09 rows=8,344 width=31) (actual time=83.049..84.039 rows=8,344 loops=1)

  • Sort Key: mix.result_id
  • Sort Method: quicksort Memory: 1,036kB
2. 16.441 78.506 ↑ 1.0 8,344 1

Hash Left Join (cost=2,481.85..3,201.76 rows=8,344 width=31) (actual time=59.868..78.506 rows=8,344 loops=1)

  • Hash Cond: ((com.id = mix.commodity_id) AND (""*VALUES*"".column1 = mix.result_id))
3. 1.489 4.320 ↑ 1.0 8,344 1

Nested Loop (cost=7.45..205.56 rows=8,344 width=8) (actual time=1.741..4.320 rows=8,344 loops=1)

4. 0.880 1.937 ↑ 1.0 298 1

Hash Join (cost=7.45..99.91 rows=298 width=4) (actual time=1.697..1.937 rows=298 loops=1)

  • Hash Cond: (res.id = ""*VALUES*"".column1)
5. 0.817 0.817 ↓ 1.0 3,166 1

Seq Scan on ""OptimizationResults"" res (cost=0.00..77.62 rows=3,162 width=4) (actual time=0.018..0.817 rows=3,166 loops=1)

6. 0.122 0.240 ↑ 1.0 298 1

Hash (cost=3.73..3.73 rows=298 width=4) (actual time=0.239..0.240 rows=298 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
7. 0.118 0.118 ↑ 1.0 298 1

Values Scan on ""*VALUES*"" (cost=0.00..3.73 rows=298 width=4) (actual time=0.003..0.118 rows=298 loops=1)

8. 0.869 0.894 ↑ 1.0 28 298

Materialize (cost=0.00..1.42 rows=28 width=4) (actual time=0.000..0.003 rows=28 loops=298)

9. 0.025 0.025 ↑ 1.0 28 1

Seq Scan on ""Commodities"" com (cost=0.00..1.28 rows=28 width=4) (actual time=0.018..0.025 rows=28 loops=1)

10. 37.172 57.745 ↑ 1.0 60,194 1

Hash (cost=1,158.56..1,158.56 rows=60,256 width=31) (actual time=57.745..57.745 rows=60,194 loops=1)

  • Buckets: 65,536 Batches: 2 Memory Usage: 2,488kB
11. 20.573 20.573 ↑ 1.0 60,194 1

Seq Scan on ""CommodityMix"" mix (cost=0.00..1,158.56 rows=60,256 width=31) (actual time=0.015..20.573 rows=60,194 loops=1)

Planning time : 0.793 ms
Execution time : 85.716 ms