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?.
id | username | login_date | |
---|---|---|---|
102 | example | example@example.com | 2018-12-06 09:30:10.573 |
102 | example | example@example.com | 2018-12-06 09:32:34.235 |
42 | rafal | rafal@example.com | 2018-12-06 09:45:24.884 |
576 | john | john@example.com | 2018-12-06 09:35:24.922 |
576 | john | john@example.com | 2018-12-07 09:58:04.253 |
SELECT 5
id | username | login_date | |
---|---|---|---|
42 | rafal | rafal@example.com | 2018-12-06 09:45:24.884 |
102 | example | example@example.com | 2018-12-06 09:30:10.573 |
576 | john | john@example.com | 2018-12-06 09:35:24.922 |
576 | john | john@example.com | 2018-12-07 09:58:04.253 |
SELECT 4