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 6
id | arr_val |
---|---|
1 | {10,20} |
2 | {20,30} |
3 | {50,5} |
4 | {30,60} |
5 | {1,5} |
6 | {7,6} |
SELECT 6
id1 | id2s | dense_rank |
---|---|---|
1 | {1,2,4} | 1 |
2 | {1,2,4} | 1 |
4 | {1,2,4} | 1 |
3 | {3,5} | 2 |
5 | {3,5} | 2 |
6 | {6} | 3 |
SELECT 6