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.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit |
4 rows affected
ctid | id | balance | last_block |
---|---|---|---|
(0,1) | 1 | 22 | 14529343 |
(0,2) | 2 | 2 | 14529343 |
(0,3) | 3 | 22 | 162529343 |
(0,4) | 4 | 4 | 14529343 |
3 rows affected
ctid | id | balance | last_block |
---|---|---|---|
(0,3) | 3 | 22 | 162529343 |
(0,5) | 1 | 11 | 14529343 |
(0,6) | 2 | 11 | 14529343 |
(0,7) | 4 | 11 | 14529343 |
3 rows affected
ctid | id | balance | last_block |
---|---|---|---|
(0,3) | 3 | 22 | 162529343 |
(0,8) | 1 | 11 | 14529343 |
(0,9) | 2 | 11 | 14529343 |
(0,10) | 4 | 11 | 14529343 |
count |
---|
3 |
count |
---|
0 |