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 11.5 (Debian 11.5-3.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
26 rows affected
id the_time the_value
1 1 10
1 2 10
1 3 7
1 4 8
1 5 6
1 6 5
1 7 4
1 8 3
1 9 7
1 10 10
1 11 3
1 12 8
1 13 2
1 14 1
1 15 1
2 1 10
2 2 10
2 3 10
2 4 13
2 5 6
2 6 5
2 7 4
2 8 3
2 9 7
2 10 10
2 11 12
id start_time end_time the_run_length
1 3 9 7
1 11 15 5
2 5 9 5