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?.
7 rows affected
created | companyid | numberofusers | rn |
---|---|---|---|
null | 1 | 4 | 1 |
null | 3 | 2 | 2 |
null | 2 | 1 | 3 |
2019-01-01 00:00:00 | 1 | 2 | 1 |
2019-01-02 00:00:00 | 1 | 1 | 6 |
2019-01-03 00:00:00 | 2 | 1 | 2 |
2019-01-04 00:00:00 | 1 | 1 | 3 |
2019-01-04 00:00:00 | 3 | 1 | 4 |
2019-01-05 00:00:00 | 3 | 1 | 5 |