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?.
10 rows affected
id | time | sensor_id | value |
---|---|---|---|
1 | 2018-01-01 00:00:01 | 1 | 1 |
2 | 2018-01-01 00:00:02 | 1 | 2 |
3 | 2018-01-01 00:00:03 | 1 | 3 |
4 | 2018-01-01 00:00:03 | 1 | 4 |
5 | 2018-01-01 00:00:04 | 1 | 3 |
6 | 2018-01-01 00:00:01 | 2 | 1 |
7 | 2018-01-01 00:00:01 | 2 | 2 |
8 | 2018-01-01 00:00:02 | 2 | 3 |
9 | 2018-01-01 00:00:03 | 2 | 4 |
10 | 2018-01-01 00:00:04 | 2 | 5 |
id | id |
---|---|
1 | 2 |
2 | 3 |
2 | 4 |
3 | 5 |
4 | 5 |
6 | 8 |
7 | 8 |
8 | 9 |
9 | 10 |
id | id |
---|---|
1 | 2 |
2 | 3 |
2 | 4 |
3 | 4 |
4 | 5 |
6 | 7 |
7 | 8 |
8 | 9 |
9 | 10 |