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?.
12 rows affected
1 rows affected
1 rows affected
product_id | store_id | available_count | onway |
---|---|---|---|
1 | 1 | 0 | 0 |
1 | 2 | 0 | 0 |
1 | 3 | 0 | 0 |
2 | 1 | 0 | 0 |
2 | 2 | 0 | 0 |
2 | 3 | 0 | 0 |
3 | 1 | 0 | 0 |
3 | 2 | 0 | 0 |
3 | 3 | 1 | 0 |
4 | 1 | 0 | 0 |
4 | 2 | 0 | 0 |
4 | 3 | 0 | 1 |
product_id | store_id | available_count | onway |
---|---|---|---|
1 | 1 | 0 | 0 |
2 | 1 | 0 | 0 |
1 | 2 | 0 | 0 |
2 | 2 | 0 | 0 |
1 | 3 | 0 | 0 |
2 | 3 | 0 | 0 |
product_id | store_id | available_count | onway |
---|---|---|---|
1 | 1 | 0 | 0 |
2 | 1 | 0 | 0 |
1 | 2 | 0 | 0 |
2 | 2 | 0 | 0 |
1 | 3 | 0 | 0 |
2 | 3 | 0 | 0 |