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?.
CREATE TABLE
INSERT 0 4
brand_group | base | count |
---|---|---|
Base | Accuracy of bill | 1 |
Base | Cleanliness | 1 |
Base | Service | 0 |
Base | Value | 0 |
Deluxe | Accuracy of bill | 0 |
Deluxe | Cleanliness | 0 |
Deluxe | Service | 1 |
Deluxe | Value | 1 |
Premium | Accuracy of bill | 0 |
Premium | Cleanliness | 2 |
Premium | Service | 1 |
Premium | Value | 0 |
SELECT 12