explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jMTb : Optimization for: plan #BIgZ

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Gather (cost=1,181,545.64..80,369,731.67 rows=120 width=132) (actual rows= loops=)

  • Workers Planned: 2
2. 0.000 0.000 ↓ 0.0

Merge Join (cost=1,180,545.64..80,368,719.67 rows=50 width=132) (actual rows= loops=)

  • Merge Cond: (fd.forecast_date = md.date)
  • Join Filter: ((ai.area && _st_expand((fd.point)::geography, '1000'::double precision)) AND ((fd.point)::geography && _st_expand(ai.area, '1000'::double precision)) AND _st_dwithin(ai.area, (fd.point)::geography, '1000'::double precision, true))
3. 0.000 0.000 ↓ 0.0

Sort (cost=24,701.89..24,949.62 rows=99,092 width=56) (actual rows= loops=)

  • Sort Key: fd.forecast_date
4. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on forecast_daily fd (cost=0.00..13,091.00 rows=99,092 width=56) (actual rows= loops=)

  • Filter: (nb_hours > 22)
5. 0.000 0.000 ↓ 0.0

Materialize (cost=993,683.58..1,003,804.61 rows=2,024,206 width=72) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Sort (cost=993,683.58..998,744.09 rows=2,024,206 width=72) (actual rows= loops=)

  • Sort Key: md.date
7. 0.000 0.000 ↓ 0.0

Hash Join (cost=235,790.32..615,604.88 rows=2,024,206 width=72) (actual rows= loops=)

  • Hash Cond: (ai.device_id = md.device_id)
  • Join Filter: ((md.date >= ai.start_date) AND ((md.date < ai.end_date) OR (ai.end_date IS NULL)))
8. 0.000 0.000 ↓ 0.0

Seq Scan on area_of_implantation ai (cost=0.00..2,062.18 rows=55,018 width=64) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash (cost=169,169.76..169,169.76 rows=3,628,685 width=24) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on measure_daily md (cost=0.00..169,169.76 rows=3,628,685 width=24) (actual rows= loops=)

  • Filter: (rainfall IS NOT NULL)