By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
CREATE TABLE
INSERT 0 2
CREATE FUNCTION
CREATE TRIGGER
id | sensorid | pm10_ug_m3 | tense | average |
---|---|---|---|---|
1 | S16 | 1.00 | 2019-07-10 04:25:59 | null |
2 | S20 | 3.00 | 2017-07-10 02:25:59 | null |
SELECT 2
INSERT 0 1
id | sensorid | pm10_ug_m3 | tense | average |
---|---|---|---|---|
1 | S16 | 1.00 | 2019-07-10 04:25:59 | null |
2 | S20 | 3.00 | 2017-07-10 02:25:59 | null |
3 | S20 | 10.00 | 2017-07-10 04:25:59 | 6.5 |
SELECT 3