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?.
4 rows affected
id_log | command | log_date | state | row_number | dense_rank |
---|---|---|---|---|---|
1 | action1 | 2017-05-04 09:59:28 | null | 1 | 1 |
2 | action1 | 2017-05-04 09:59:29 | SUCCESS | 2 | 1 |
3 | action2 | 2017-05-04 10:00:22 | null | 1 | 2 |
4 | action2 | 2017-05-04 10:00:24 | FAILURE | 2 | 2 |