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?.
CREATE TABLE
INSERT 0 100
id value delta
21 480 null
52 573 93
80 617 44
94 656 39
4 702 46
33 1090 388
30 1108 18
68 1195 87
12 1320 125
86 1678 358
SELECT 10
grp value gap
0 480 null
0 573 null
0 617 null
0 656 null
0 702 null
1 1090 t
1 1108 null
1 1195 null
1 1320 null
2 1678 t
SELECT 10
grp grp_count grp_avg
0 5 605.60
1 4 1178.25
2 4 1747.25
3 3 2193.67
4 9 2612.44
5 3 3209.00
6 2 3550.00
7 1 3905.00
8 6 4248.83
9 1 4537.00
10 1 4810.00
11 4 5013.00
12 20 5826.95
13 1 6439.00
14 12 7057.33
15 1 7543.00
16 1 7717.00
17 5 8030.60
18 4 8517.00
19 4 8899.00
20 9 9474.22
SELECT 21