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 12
session_id | step | device |
---|---|---|
351acc | step1 | mobile |
351acc | step2 | mobile |
351acc | step3 | mobile |
351acc | step4 | mobile |
350bca | step1 | desktop |
350bca | step2 | desktop |
350bca | step3 | desktop |
350bca | step4 | desktop |
111bca | step1 | 1st notnull |
111bca | step2 | 1st notnull |
111bca | step3 | not this |
111bca | step4 | and not this |
SELECT 12