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?.
14 rows affected
ts | val |
---|---|
100000 | 50 |
130100 | 30050 |
160100 | 60050 |
190200 | 100 |
220200 | 30100 |
250200 | 30100 |
300000 | 300 |
500000 | 100 |
550000 | 1000 |
600000 | 1000 |
650000 | 2000 |
700000 | 2000 |
720000 | 2000 |
750000 | 300 |
ts | val | is_diff | sum |
---|---|---|---|
100000 | 50 | 1 | 1 |
130100 | 30050 | 1 | 2 |
160100 | 60050 | 1 | 3 |
190200 | 100 | 1 | 4 |
220200 | 30100 | 1 | 5 |
250200 | 30100 | 0 | 5 |
300000 | 300 | 1 | 6 |
500000 | 100 | 1 | 7 |
550000 | 1000 | 1 | 8 |
600000 | 1000 | 0 | 8 |
650000 | 2000 | 1 | 9 |
700000 | 2000 | 0 | 9 |
720000 | 2000 | 0 | 9 |
750000 | 300 | 1 | 10 |