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.23 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-15), 64-bit |
SELECT 1
CREATE TABLE
CREATE TABLE
CREATE SEQUENCE
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 11
id | description | parent_id | cost |
---|---|---|---|
1 | Cardiology | null | 0.00 |
2 | Tests | null | 0.00 |
3 | Cardioversion | 1 | 0.00 |
4 | Ecocardiography | 1 | 0.00 |
5 | Tests | 1 | 0.00 |
6 | Tests | 2 | 0.00 |
1385 | Electric Cardioversion programmed | 3 | 200.00 |
204 | Calcium | 5 | 50.00 |
1386 | Electric Cardioversi on programmed | 3 | 2000.00 |
7000 | Chest Ultrasound | 4 | 100.00 |
2044 | Calcium | 6 | 50.00 |
SELECT 11