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?.
3 rows affected
id | dt | dt | dow | wk | yr |
---|---|---|---|---|---|
1 | 2015-W02 | 2015-01-10 00:00:00 | 6 | 2 | 2015 |
2 | 2015-W08 | 2015-02-21 00:00:00 | 6 | 8 | 2015 |
3 | 2015-W21 | 2015-05-23 00:00:00 | 6 | 21 | 2015 |