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?.
DROP TABLE
CREATE TABLE
INSERT 0 2
id | date | params |
---|---|---|
351 | 2022-07-01 | {"type": "follow", "country": "fr"} |
5356 | 2022-07-01 | {"type": "sub", "country": "de", "quality": "tier3"} |
SELECT 2
id | date | type | country | quality |
---|---|---|---|---|
351 | 2022-07-01 | follow | fr | null |
5356 | 2022-07-01 | sub | de | tier3 |
SELECT 2