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?.
12 rows affected
order_date | rolling_count |
---|---|
2020-01-15 | 1 |
2020-01-25 | 1 |
2020-02-03 | 2 |
2020-02-15 | 3 |
2020-02-26 | 2 |
2020-03-18 | 1 |
2020-03-20 | 2 |
2020-04-22 | 3 |
2020-11-23 | 1 |
2021-01-17 | 2 |
2021-01-19 | 4 |
2021-02-20 | 3 |
order_date | quantity |
---|---|
2020-01-15 | 1 |
2020-01-25 | 1 |
2020-02-03 | 0 |
2020-02-15 | 0 |
2020-02-26 | 0 |
2020-03-18 | 1 |
2020-03-20 | 0 |
2020-04-22 | 0 |
2020-11-23 | 1 |
2021-01-17 | 0 |
2021-01-19 | 0 |
2021-02-20 | 0 |