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
p | q | r |
---|---|---|
1 | A | 甲 |
2 | A | 丙 |
3 | D | 甲 |
4 | C | 丙 |
5 | X | 乙 |
6 | A | 甲 |
7 | D | 甲 |
8 | C | 乙 |
9 | X | 甲 |
10 | D | null |
11 | C | 乙 |
12 | C | 乙 |
q | r | m | percent |
---|---|---|---|
A | 甲 | 2 | 40% |
D | 甲 | 2 | 40% |
X | 甲 | 1 | 20% |
C | 乙 | 3 | 75% |
X | 乙 | 1 | 25% |
A | 丙 | 1 | 50% |
C | 丙 | 1 | 50% |