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 EXTENSION
DROP TABLE
CREATE TABLE
INSERT 0 8
tree level parent side
1 1 null
1.L2 2 1 L
1.R2 2 1 R
1.L2.L3 3 1.L2 L
1.L2.R3 3 1.L2 R
1.L2.L3.L4 4 1.L2.L3 L
1.L2.R3.R4 4 1.L2.R3 R
1.L2.R3.L4 4 1.L2.R3 L
SELECT 8
id tree person_id
1 1 1
2 1.L2 2
4 1.L2.L3 4
6 1.L2.L3.L4 6
SELECT 4
id tree person_id
1 1 1
2 1.L2 2
4 1.L2.L3 4
6 1.L2.L3.L4 6
SELECT 4