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?.
8 rows affected
id | employee_id | company_id | activity_type | created_at |
---|---|---|---|---|
1 | 1 | 1 | 1 | 2020-11-18 07:10:25 |
2 | 2 | 1 | 1 | 2020-11-18 07:30:25 |
3 | 3 | 1 | 1 | 2020-11-18 07:50:25 |
4 | 2 | 1 | 2 | 2020-11-18 19:10:25 |
5 | 3 | 1 | 2 | 2020-11-18 19:22:38 |
6 | 1 | 1 | 2 | 2020-11-18 20:01:05 |
7 | 1 | 1 | 1 | 2020-11-19 07:11:23 |
8 | 1 | 1 | 2 | 2020-11-19 18:21:53 |
created_at | company_id | employee_id | max | max |
---|---|---|---|---|
2020-11-18 | 1 | 2 | 07:30:25 | 19:10:25 |
2020-11-19 | 1 | 1 | 07:11:23 | 18:21:53 |
2020-11-18 | 1 | 3 | 07:50:25 | 19:22:38 |
2020-11-18 | 1 | 1 | 07:10:25 | 20:01:05 |