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?.
10 rows affected
employee_id | from_date |
---|---|
3 | 2002-02-02 |
4 | 2001-01-01 |
2 | 2005-01-01 |
1 | 2015-01-01 |
employee_id | from_date | to_date | rownum |
---|---|---|---|
1 | 2015-01-01 | 2018-01-01 | 1 |
2 | 2005-01-01 | 2006-01-01 | 1 |
2 | 2005-01-01 | 2006-01-01 | 2 |
2 | 2007-01-01 | 2007-05-05 | 3 |
3 | 2002-02-02 | 2004-02-02 | 1 |
3 | 2010-01-01 | 2015-01-01 | 2 |
4 | 2001-01-01 | 2005-03-03 | 1 |
4 | 2003-03-03 | 2004-04-04 | 2 |
employee_id | from_date | min |
---|---|---|
2 | 2005-01-01 | 2006-01-01 |
3 | 2002-02-02 | 2004-02-02 |
employee_id | from_date | to_date |
---|---|---|
2 | 2005-01-01 | 2006-01-01 |
3 | 2002-02-02 | 2004-02-02 |