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
rnum | date | regexp_replace | category | direction |
---|---|---|---|---|
0 | 2011-02-02 00:00:00 | 0H 1234 NJKL/987 | A | N |
1 | 2011-02-02 00:00:00 | 0H 4321 NBNM/987 | A | N |
2 | 2011-02-02 00:00:00 | 0H 5678+NJKL/987 | A | N |
3 | 2011-02-02 00:00:00 | 0H 8765 SBNM/987 | A | S |
4 | 2011-02-02 00:00:00 | 0H 9021+SJKL/987 | A | S |
5 | 2011-02-02 00:00:00 | 0H 1102+NJKL/987 | A | N |
SELECT 6