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 |
id |
---|
1 |
2 |
3 |
4 |
5 |
6 |
6 rows affected
accounting_document | accounting_document_type | company_code | document_date_year |
---|---|---|---|
A | B | C | 0 |
A | B | C | 1 |
A | B | C | 2 |
A | B | C | 3 |
A | B | C | 4 |
A | B | C | 5 |
supplier_balance_id | posting_view_item |
---|---|
1 | A |
1 | B |
3 | A |
3 | B |
2 | A |
1 | C |
id | accounting_document | accounting_document_type | company_code | document_date_year | posting_view_item |
---|---|---|---|---|---|
2 | A | B | C | 1 | A |
3 | A | B | C | 2 | A |
3 | A | B | C | 2 | B |
id | accounting_document | accounting_document_type | company_code | document_date_year | posting_view_item |
---|---|---|---|---|---|
2 | A | B | C | 1 | A |
3 | A | B | C | 2 | A |
3 | A | B | C | 2 | B |