explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9l6

Settings
# exclusive inclusive rows x rows loops node
1. 4,026.387 49,276.345 ↓ 11.6 5,844,065 1

Merge Join (cost=1,270,404.54..1,430,363.93 rows=502,291 width=158) (actual time=20,916.562..49,276.345 rows=5,844,065 loops=1)

  • Merge Cond: ((f.delivery_date = g.sced_date) AND (f.hr = ((g.sced_hour)::numeric)) AND ((f.zone)::text = (g.zone)::text) AND (f.forecast_type = g.dispatch_type))
2. 204.304 204.304 ↑ 1.0 661,854 1

Index Scan using t_forecast_idx on temp_forecast f (cost=0.42..40,026.11 rows=667,325 width=37) (actual time=0.008..204.304 rows=661,854 loops=1)

3. 1,741.237 45,045.654 ↓ 1.0 6,111,823 1

Materialize (cost=1,270,404.11..1,300,962.61 rows=6,111,700 width=121) (actual time=20,916.436..45,045.654 rows=6,111,823 loops=1)

4. 40,466.851 43,304.417 ↓ 1.0 6,111,823 1

Sort (cost=1,270,404.11..1,285,683.36 rows=6,111,700 width=121) (actual time=20,916.433..43,304.417 rows=6,111,823 loops=1)

  • Sort Key: g.sced_date, ((g.sced_hour)::numeric), g.zone, g.dispatch_type
  • Sort Method: external merge Disk: 884760kB
5. 2,837.566 2,837.566 ↓ 1.0 6,111,823 1

Seq Scan on temp_gen_avg g (cost=0.00..184,616.00 rows=6,111,700 width=121) (actual time=0.012..2,837.566 rows=6,111,823 loops=1)

Planning time : 1.112 ms
Execution time : 50,105.004 ms