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.132 ms |
Execution Time: 358.986 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: 45.265 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.050 ms |
Execution Time: 38.579 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: 37.988 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.051 ms |
Execution Time: 359.487 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.055 ms |
Execution Time: 57.583 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.050 ms |
Execution Time: 48.094 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.070 ms |
Execution Time: 39.625 ms |
EXPLAIN