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 9
min_date | store | Vx | units |
---|---|---|---|
2019-10-01 | 1 | F | [0, 1, 0, 1, 0] |
2019-10-02 | 2 | F | [1, 0, 1, 0] |
SELECT 2
jsonb_build_object |
---|
{"date": "2019-10-01", "Units": [0, 1, 0, 1, 0], "join_store_Vx": [1, "F"]} |
{"date": "2019-10-02", "Units": [1, 0, 1, 0], "join_store_Vx": [2, "F"]} |
SELECT 2