explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VFm7

Settings
# exclusive inclusive rows x rows loops node
1. 57,559.199 85,814.746 ↑ 1.2 76,661 1

Nested Loop (cost=92,055.54..665,114.72 rows=88,228 width=68) (actual time=1,529.992..85,814.746 rows=76,661 loops=1)

  • Join Filter: (((a.a = b.start_time) AND (b.period = '00:15:00'::interval)) OR ((date_trunc('hour'::text, a.a) = b.start_time) AND (b.period = '01:00:00'::interval)) OR ((date_trunc('day'::text, a.a) = b.start_time) AND (b.period = '1 day'::interval)))
  • Rows Removed by Join Filter: 45998683
2. 0.971 0.971 ↑ 3.0 336 1

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

3. 26,159.996 28,254.576 ↓ 7.8 137,129 336

Materialize (cost=92,055.52..94,513.59 rows=17,558 width=52) (actual time=4.555..84.091 rows=137,129 loops=336)

4. 164.742 2,094.580 ↓ 7.8 137,129 1

Subquery Scan on b (cost=92,055.52..94,425.80 rows=17,558 width=52) (actual time=1,529.877..2,094.580 rows=137,129 loops=1)

5. 268.827 1,929.838 ↓ 7.8 137,129 1

Unique (cost=92,055.52..94,250.22 rows=17,558 width=64) (actual time=1,529.874..1,929.838 rows=137,129 loops=1)

6. 478.476 1,661.011 ↓ 1.2 213,247 1

Sort (cost=92,055.52..92,494.46 rows=175,576 width=64) (actual time=1,529.868..1,661.011 rows=213,247 loops=1)

  • Sort Key: capacity.start_time, capacity.border_id, capacity.period, capacity.forecast_interval, capacity.dump_date DESC
  • Sort Method: quicksort Memory: 36132kB
7. 258.660 1,182.535 ↓ 1.2 213,247 1

Custom Scan (ConstraintAwareAppend) (cost=0.00..76,761.32 rows=175,576 width=64) (actual time=0.418..1,182.535 rows=213,247 loops=1)

  • Hypertable: capacity
  • Chunks left after exclusion: 25
8. 236.716 923.875 ↓ 1.2 213,247 1

Append (cost=0.00..76,761.32 rows=175,576 width=60) (actual time=0.415..923.875 rows=213,247 loops=1)

9. 0.032 0.032 ↓ 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.032..0.032 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.020 0.020 ↓ 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.020..0.020 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.020 0.020 ↓ 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.020..0.020 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.018 0.018 ↓ 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.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)))
13. 0.019 0.019 ↓ 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.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)))
14. 0.027 0.027 ↓ 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.027..0.027 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.017 0.017 ↓ 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.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)))
16. 0.017 0.017 ↓ 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.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)))
17. 0.037 0.037 ↓ 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.037..0.037 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.033 0.033 ↓ 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.033..0.033 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.021 0.021 ↓ 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.021..0.021 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.022 0.022 ↓ 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.022..0.022 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.019 0.019 ↓ 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.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)))
22. 0.020 0.020 ↓ 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.020..0.020 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.019 0.019 ↓ 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.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)))
24. 59.512 59.512 ↑ 1.4 22,088 1

Index Scan using _hyper_1_27_chunk_capacity_start_time_idx on _hyper_1_27_chunk (cost=0.43..25,433.55 rows=30,783 width=60) (actual time=0.060..59.512 rows=22,088 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: 8113
25. 224.761 224.761 ↓ 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.052..224.761 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. 154.074 154.074 ↓ 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.030..154.074 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. 117.351 117.351 ↓ 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.039..117.351 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.187 0.187 ↑ 1.0 80 1

Seq Scan on _hyper_1_85_chunk (cost=0.00..5.60 rows=80 width=60) (actual time=0.032..0.187 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.286 0.286 ↑ 1.0 128 1

Seq Scan on _hyper_1_86_chunk (cost=0.00..8.16 rows=128 width=60) (actual time=0.018..0.286 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. 24.987 24.987 ↓ 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.020..24.987 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.342 0.342 ↑ 1.0 160 1

Seq Scan on _hyper_1_88_chunk (cost=0.00..9.20 rows=160 width=60) (actual time=0.035..0.342 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. 35.722 35.722 ↓ 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.023..35.722 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. 69.596 69.596 ↓ 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.033..69.596 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 : 12.293 ms
Execution time : 85,868.277 ms