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
CREATE TABLE
INSERT 0 5
id_building | street |
---|---|
1 | St Michael's Rd |
2 | Crossford St |
3 | Stockwell Park Cres |
SELECT 3
id_family | id_building | name |
---|---|---|
1 | 1 | Brown |
2 | 1 | White |
3 | 3 | Smith |
SELECT 3
id_person | id_family | name |
---|---|---|
1 | 2 | John |
2 | 2 | Jenny |
3 | 2 | Pepy |
4 | 1 | Conny |
5 | 3 | John |
SELECT 5