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 1000
str
1
10
100
1000
101
102
103
104
105
106
SELECT 10
CREATE COLLATION
str
1
2
3
4
5
6
7
8
9
10
SELECT 10
CREATE INDEX
CREATE INDEX
QUERY PLAN
Limit (cost=0.28..0.86 rows=10 width=32)
  -> Index Only Scan using demo_str on demo (cost=0.28..59.27 rows=1000 width=32)
EXPLAIN
QUERY PLAN
Limit (cost=0.28..0.86 rows=10 width=64)
  -> Index Only Scan using demo_str_numeric_collation on demo (cost=0.28..59.27 rows=1000 width=64)
EXPLAIN