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?.
int4 |
---|
[5:7]={1,2,3} |
SELECT 1
int4 |
---|
1 |
SELECT 1
int4 |
---|
{1,2,3} |
SELECT 1
a |
---|
{1,2,3} |
SELECT 1
CREATE TABLE
INSERT 0 100000
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..3792.04 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.191 ms |
Execution Time: 291.549 ms |
EXPLAIN
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..2839.36 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.052 ms |
Execution Time: 39.067 ms |
EXPLAIN
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..2204.24 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.049 ms |
Execution Time: 32.711 ms |
EXPLAIN
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..2204.24 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.047 ms |
Execution Time: 32.403 ms |
EXPLAIN
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..3792.04 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.050 ms |
Execution Time: 362.206 ms |
EXPLAIN
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..2839.36 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.051 ms |
Execution Time: 38.932 ms |
EXPLAIN
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..2204.24 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.044 ms |
Execution Time: 32.510 ms |
EXPLAIN
QUERY PLAN |
---|
Seq Scan on tbl (cost=0.00..2204.24 rows=127024 width=32) (actual rows=100000 loops=1) |
Planning Time: 0.039 ms |
Execution Time: 32.156 ms |
EXPLAIN