explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CpB5

Settings
# exclusive inclusive rows x rows loops node
1. 52.787 1,599.120 ↑ 1.2 22,895 1

Merge Join (cost=86,358.52..91,245.14 rows=27,759 width=68) (actual time=1,414.027..1,599.120 rows=22,895 loops=1)

  • Merge Cond: (a.a = capacity.start_time)
  • Join Filter: ((capacity.period = '00:15:00'::interval) OR ((date_trunc('hour'::text, a.a) = capacity.start_time) AND (capacity.period = '01:00:00'::interval)) OR ((date_trunc('day'::text, a.a) = capacity.start_time) AND (capacity.period = '1 day'::interval)))
  • Rows Removed by Join Filter: 656
2. 0.463 0.680 ↑ 3.0 336 1

Sort (cost=59.86..62.36 rows=1,000 width=8) (actual time=0.435..0.680 rows=336 loops=1)

  • Sort Key: a.a
  • Sort Method: quicksort Memory: 40kB
3. 0.217 0.217 ↑ 3.0 336 1

Function Scan on generate_series a (cost=0.03..10.03 rows=1,000 width=8) (actual time=0.045..0.217 rows=336 loops=1)

4. 35.800 1,545.653 ↓ 1.9 30,446 1

Materialize (cost=86,298.66..88,554.85 rows=16,409 width=52) (actual time=1,413.564..1,545.653 rows=30,446 loops=1)

5. 61.819 1,509.853 ↓ 1.9 30,446 1

Unique (cost=86,298.66..88,349.74 rows=16,409 width=64) (actual time=1,413.560..1,509.853 rows=30,446 loops=1)

6. 423.363 1,448.034 ↑ 3.2 51,416 1

Sort (cost=86,298.66..86,708.88 rows=164,086 width=64) (actual time=1,413.556..1,448.034 rows=51,416 loops=1)

  • Sort Key: capacity.start_time, capacity.border_id, capacity.period, capacity.forecast_interval, capacity.dump_date DESC
  • Sort Method: quicksort Memory: 36851kB
7. 273.209 1,024.671 ↓ 1.3 218,359 1

Custom Scan (ConstraintAwareAppend) (cost=0.00..72,085.46 rows=164,086 width=64) (actual time=0.331..1,024.671 rows=218,359 loops=1)

  • Hypertable: capacity
  • Chunks left after exclusion: 25
8. 252.832 751.462 ↓ 1.3 218,359 1

Append (cost=0.00..72,085.46 rows=164,086 width=60) (actual time=0.328..751.462 rows=218,359 loops=1)

9. 0.017 0.017 ↓ 0.0 0 1

Index Scan using _hyper_1_9_chunk_capacity_start_time_idx on _hyper_1_9_chunk (cost=0.29..2.21 rows=1 width=60) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
10. 0.053 0.053 ↓ 0.0 0 1

Index Scan using _hyper_1_10_chunk_capacity_start_time_idx on _hyper_1_10_chunk (cost=0.30..1.58 rows=1 width=60) (actual time=0.053..0.053 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
11. 0.019 0.019 ↓ 0.0 0 1

Index Scan using _hyper_1_11_chunk_capacity_start_time_idx on _hyper_1_11_chunk (cost=0.43..1.73 rows=1 width=60) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
12. 0.015 0.015 ↓ 0.0 0 1

Index Scan using _hyper_1_12_chunk_capacity_start_time_idx on _hyper_1_12_chunk (cost=0.29..1.99 rows=1 width=60) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
13. 0.015 0.015 ↓ 0.0 0 1

Index Scan using _hyper_1_13_chunk_capacity_start_time_idx on _hyper_1_13_chunk (cost=0.29..2.04 rows=1 width=60) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
14. 0.015 0.015 ↓ 0.0 0 1

Index Scan using _hyper_1_14_chunk_capacity_start_time_idx on _hyper_1_14_chunk (cost=0.28..2.29 rows=1 width=60) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
15. 0.019 0.019 ↓ 0.0 0 1

Index Scan using _hyper_1_15_chunk_capacity_start_time_idx on _hyper_1_15_chunk (cost=0.29..2.29 rows=1 width=60) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
16. 0.015 0.015 ↓ 0.0 0 1

Index Scan using _hyper_1_16_chunk_capacity_start_time_idx on _hyper_1_16_chunk (cost=0.29..1.97 rows=1 width=60) (actual time=0.015..0.015 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
17. 0.016 0.016 ↓ 0.0 0 1

Index Scan using _hyper_1_17_chunk_capacity_start_time_idx on _hyper_1_17_chunk (cost=0.28..2.23 rows=1 width=60) (actual time=0.016..0.016 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
18. 0.017 0.017 ↓ 0.0 0 1

Index Scan using _hyper_1_18_chunk_capacity_start_time_idx on _hyper_1_18_chunk (cost=0.28..2.31 rows=1 width=60) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
19. 0.019 0.019 ↓ 0.0 0 1

Index Scan using _hyper_1_21_chunk_capacity_start_time_idx on _hyper_1_21_chunk (cost=0.43..2.03 rows=1 width=60) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
20. 0.018 0.018 ↓ 0.0 0 1

Index Scan using _hyper_1_23_chunk_capacity_start_time_idx on _hyper_1_23_chunk (cost=0.43..1.89 rows=1 width=60) (actual time=0.018..0.018 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
21. 0.018 0.018 ↓ 0.0 0 1

Index Scan using _hyper_1_24_chunk_capacity_start_time_idx on _hyper_1_24_chunk (cost=0.43..1.76 rows=1 width=60) (actual time=0.018..0.018 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
22. 0.017 0.017 ↓ 0.0 0 1

Index Scan using _hyper_1_25_chunk_capacity_start_time_idx on _hyper_1_25_chunk (cost=0.43..1.65 rows=1 width=60) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
23. 0.017 0.017 ↓ 0.0 0 1

Index Scan using _hyper_1_26_chunk_capacity_start_time_idx on _hyper_1_26_chunk (cost=0.43..2.42 rows=1 width=60) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
24. 62.818 62.818 ↓ 1.4 27,200 1

Index Scan using _hyper_1_27_chunk_capacity_start_time_idx on _hyper_1_27_chunk (cost=0.43..20,757.68 rows=19,293 width=60) (actual time=0.025..62.818 rows=27,200 loops=1)

  • Index Cond: (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone))
  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)))
  • Rows Removed by Filter: 8209
25. 130.807 130.807 ↓ 1.3 67,894 1

Seq Scan on _hyper_1_28_chunk (cost=0.00..19,870.28 rows=50,889 width=60) (actual time=0.036..130.807 rows=67,894 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
  • Rows Removed by Filter: 4176
26. 93.761 93.761 ↓ 1.3 49,609 1

Seq Scan on _hyper_1_66_chunk (cost=0.00..10,460.29 rows=37,852 width=60) (actual time=0.022..93.761 rows=49,609 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
27. 70.198 70.198 ↓ 1.3 31,248 1

Seq Scan on _hyper_1_70_chunk (cost=0.00..9,571.56 rows=23,894 width=60) (actual time=0.021..70.198 rows=31,248 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
28. 0.296 0.296 ↑ 1.0 80 1

Seq Scan on _hyper_1_85_chunk (cost=0.00..5.60 rows=80 width=60) (actual time=0.028..0.296 rows=80 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
29. 0.478 0.478 ↑ 1.0 128 1

Seq Scan on _hyper_1_86_chunk (cost=0.00..8.16 rows=128 width=60) (actual time=0.020..0.478 rows=128 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
30. 37.940 37.940 ↓ 1.3 13,016 1

Seq Scan on _hyper_1_87_chunk (cost=0.00..694.02 rows=9,829 width=60) (actual time=0.021..37.940 rows=13,016 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
31. 0.493 0.493 ↑ 1.0 160 1

Seq Scan on _hyper_1_88_chunk (cost=0.00..9.20 rows=160 width=60) (actual time=0.029..0.493 rows=160 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
32. 43.950 43.950 ↓ 1.3 13,680 1

Seq Scan on _hyper_1_89_chunk (cost=0.00..2,460.60 rows=10,272 width=60) (actual time=0.022..43.950 rows=13,680 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
33. 57.599 57.599 ↓ 1.3 15,344 1

Seq Scan on _hyper_1_90_chunk (cost=0.00..8,217.68 rows=11,673 width=60) (actual time=0.027..57.599 rows=15,344 loops=1)

  • Filter: ((capacity_type_id = 1) AND ((period = '00:15:00'::interval) OR (period = '01:00:00'::interval) OR (period = '1 day'::interval)) AND (start_time >= timezone('Europe/Amsterdam'::text, ((now())::date)::timestamp with time zone)))
Planning time : 6.179 ms
Execution time : 1,618.725 ms