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?.
version |
---|
PostgreSQL 10.9 (Debian 10.9-1.pgdg80+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 4.9.2-10+deb8u2) 4.9.2, 64-bit |
14 rows affected
did | dt | count |
---|---|---|
C | 2019-01-03 | 1 |
C | 2019-01-01 | 1 |
D | 2019-01-03 | 1 |
A | 2019-01-02 | 1 |
A | 2019-01-03 | 1 |
D | 2019-01-01 | 1 |
B | 2019-01-02 | 1 |
B | 2019-01-03 | 1 |
D | 2019-01-02 | 1 |
B | 2019-01-01 | 1 |
did | count |
---|---|
D | 3 |
B | 3 |
did | count |
---|---|
B | 3 |
D | 3 |