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
7 rows affected
id | count_direct_child_items | count_recursive_child_items |
---|---|---|
1 | 1 | 7 |
2 | 1 | 6 |
3 | 0 | 3 |
4 | 2 | 2 |
5 | 0 | 0 |
6 | 0 | 0 |
7 | 3 | 3 |
id | count_direct_child_items | count_recursive_child_items |
---|---|---|
1 | 1 | 7 |
2 | 1 | 6 |
3 | 0 | 3 |
4 | 2 | 2 |
5 | 0 | 0 |
6 | 0 | 0 |
7 | 3 | 3 |