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
CREATE TABLE
INSERT 0 3
prod_id | info_id | description | price |
---|---|---|---|
1 | null | pen | 1 |
2 | null | notebook | 2 |
3 | null | ruller | 3 |
SELECT 3
info_id | info_text |
---|
SELECT 0
INSERT 0 3
prod_id | info_id | description | price |
---|---|---|---|
1 | 1 | pen | 1 |
2 | 2 | notebook | 2 |
3 | 3 | ruller | 3 |
SELECT 3
info_id | info_text |
---|---|
1 | null |
2 | null |
3 | null |
SELECT 3