explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FHrH

Settings
# exclusive inclusive rows x rows loops node
1. 240.785 5,284.108 ↑ 56.5 22,116 1

Unique (cost=671,977.96..690,718.15 rows=1,249,346 width=158) (actual time=4,907.019..5,284.108 rows=22,116 loops=1)

2. 2,332.070 5,043.323 ↓ 1.0 1,305,349 1

Sort (cost=671,977.96..675,101.32 rows=1,249,346 width=158) (actual time=4,907.017..5,043.323 rows=1,305,349 loops=1)

  • Sort Key: forecast_production.start_time, forecast_production.area_eid, forecast_production.fuel_id, forecast_production.data_source_id, runtype.identifier, forecast_production.dump_date DESC
  • Sort Method: external merge Disk: 75,624kB
3. 627.027 2,711.253 ↓ 1.0 1,305,349 1

Gather (cost=1,002.51..489,340.55 rows=1,249,346 width=158) (actual time=9.318..2,711.253 rows=1,305,349 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
4. 83.762 2,084.226 ↑ 1.2 261,070 5 / 5

Hash Join (cost=2.51..354,035.85 rows=312,336 width=158) (actual time=0.339..2,084.226 rows=261,070 loops=5)

  • Hash Cond: (forecast_production.runtype = runtype.id)
5. 30.108 2,000.437 ↑ 1.2 261,070 5 / 5

Append (cost=0.00..346,980.59 rows=312,337 width=52) (actual time=0.239..2,000.437 rows=261,070 loops=5)

6. 0.000 0.000 ↓ 0.0 0 5 / 5

Parallel Seq Scan on forecast_production (cost=0.00..0.00 rows=1 width=52) (actual time=0.000..0.000 rows=0 loops=5)

  • Filter: ((start_time >= '2020-10-13 00:00:00+02'::timestamp with time zone) AND (start_time < '2020-10-14 00:00:00+02'::timestamp with time zone) AND (dump_date < '2020-10-12 16:00:00+02'::timestamp with time zone) AND CASE WHEN (data_source_id = 56) THEN (runtype = 17) ELSE true END AND (area_eid = ANY ('{6,7,8,9,43,69,73,96,108,109,222,229,245,247,248,249,250,10,254,30,31,33,34,35,38,232,252,100,270,235,256,98,233,268,230,227}'::integer[])))
7. 1,970.329 1,970.329 ↑ 1.2 261,070 5 / 5

Parallel Index Scan using _hyper_18_1281_chunk_forecast_production_start_time_idx on _hyper_18_1281_chunk (cost=0.44..346,980.59 rows=312,336 width=52) (actual time=0.237..1,970.329 rows=261,070 loops=5)

  • Index Cond: ((start_time >= '2020-10-13 00:00:00+02'::timestamp with time zone) AND (start_time < '2020-10-14 00:00:00+02'::timestamp with time zone))
  • Filter: ((dump_date < '2020-10-12 16:00:00+02'::timestamp with time zone) AND CASE WHEN (data_source_id = 56) THEN (runtype = 17) ELSE true END AND (area_eid = ANY ('{6,7,8,9,43,69,73,96,108,109,222,229,245,247,248,249,250,10,254,30,31,33,34,35,38,232,252,100,270,235,256,98,233,268,230,227}'::integer[])))
  • Rows Removed by Filter: 523,551
8. 0.012 0.027 ↑ 1.0 67 5 / 5

Hash (cost=1.67..1.67 rows=67 width=122) (actual time=0.027..0.027 rows=67 loops=5)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
9. 0.015 0.015 ↑ 1.0 67 5 / 5

Seq Scan on runtype (cost=0.00..1.67 rows=67 width=122) (actual time=0.009..0.015 rows=67 loops=5)

Planning time : 0.751 ms
Execution time : 5,297.183 ms