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 14.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4), 64-bit |
acquired | founded | n | case1 | case2 | x1 | x2 |
---|---|---|---|---|---|---|
2021-12-26 | 2017-12-26 00:00:00 | 4 | null | null | 1461 days | 2017-12-26 00:00:00 |
2021-12-26 | 2018-12-26 00:00:00 | 3 | 1 | null | 1096 days | 2018-12-26 00:00:00 |
2021-12-26 | 2019-12-26 00:00:00 | 2 | 1 | 1 | 731 days | 2019-12-26 00:00:00 |
2021-12-26 | 2020-12-26 00:00:00 | 1 | 1 | 1 | 365 days | 2020-12-26 00:00:00 |