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 4
tuple |
---|
A |
B |
C |
D |
AA |
AB |
AC |
AD |
BB |
BC |
BD |
CC |
CD |
DD |
AAA |
AAB |
AAC |
AAD |
ABB |
ABC |
ABD |
ACC |
ACD |
ADD |
BBB |
BBC |
BBD |
BCC |
BCD |
BDD |
CCC |
CCD |
CDD |
DDD |
AAAA |
AAAB |
AAAC |
AAAD |
AABB |
AABC |
AABD |
AACC |
AACD |
AADD |
ABBB |
ABBC |
ABBD |
ABCC |
ABCD |
ABDD |
ACCC |
ACCD |
ACDD |
ADDD |
BBBB |
BBBC |
BBBD |
BBCC |
BBCD |
BBDD |
BCCC |
BCCD |
BCDD |
BDDD |
CCCC |
CCCD |
CCDD |
CDDD |
DDDD |
SELECT 69