add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
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?.
version
PostgreSQL 12.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1), 64-bit
21 rows affected
lpo_id least greatest
1 4 6
2 4 6
3 6 68
4 6 68
5 6 18
6 6 18
7 18 36
8 18 36
9 1 2
10 1 3
11 1 4
12 1 5
13 1 6
14 1 7
15 1 8
16 2 3
17 2 4
18 2 5
19 2 6
20 2 7
21 2 8
lpo_id least greatest rn
1 4 6 2
2 4 6 1
3 6 68 2
4 6 68 1
5 6 18 2
6 6 18 1
7 18 36 2
8 18 36 1
9 1 2 1
10 1 3 1
11 1 4 1
12 1 5 1
13 1 6 1
14 1 7 1
15 1 8 1
16 2 3 1
17 2 4 1
18 2 5 1
19 2 6 1
20 2 7 1
21 2 8 1
lpo_id least greatest rn
1 4 6 2
2 4 6 1
3 6 68 2
4 6 68 1
5 6 18 2
6 6 18 1
7 18 36 2
8 18 36 1
9 1 2 1
10 1 3 1
11 1 4 1
12 1 5 1
13 1 6 1
14 1 7 1
15 1 8 1
16 2 3 1
17 2 4 1
18 2 5 1
19 2 6 1
20 2 7 1
21 2 8 1
4 rows affected
lpo_id least greatest
2 4 6
4 6 68
6 6 18
8 18 36
9 1 2
10 1 3
11 1 4
12 1 5
13 1 6
14 1 7
15 1 8
16 2 3
17 2 4
18 2 5
19 2 6
20 2 7
21 2 8