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?.
QUERY PLAN |
---|
Append (cost=0.00..233.15 rows=55 width=36) (actual time=0.050..0.091 rows=1 loops=1) |
-> Seq Scan on t1 (cost=0.00..0.00 rows=1 width=36) (actual time=0.006..0.007 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
-> Seq Scan on t1_j (cost=0.00..25.88 rows=6 width=36) (actual time=0.011..0.011 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_n (cost=0.00..25.88 rows=6 width=36) (actual time=0.013..0.013 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_m (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_r (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 2 |
-> Seq Scan on t1_a (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=1 loops=1) |
Filter: (name = 'Arin'::text) |
-> Seq Scan on t1_v (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_i (cost=0.00..25.88 rows=6 width=36) (actual time=0.019..0.020 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_u (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.007 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_k (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=0 loops=1) |
Filter: (name = 'Arin'::text) |
Rows Removed by Filter: 1 |
Planning Time: 0.743 ms |
Execution Time: 0.131 ms |
QUERY PLAN |
---|
Append (cost=0.00..233.15 rows=55 width=36) (actual time=0.037..0.061 rows=1 loops=1) |
-> Seq Scan on t1 (cost=0.00..0.00 rows=1 width=36) (actual time=0.005..0.005 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
-> Seq Scan on t1_j (cost=0.00..25.88 rows=6 width=36) (actual time=0.008..0.008 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_n (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_m (cost=0.00..25.88 rows=6 width=36) (actual time=0.005..0.005 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_r (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 2 |
-> Seq Scan on t1_a (cost=0.00..25.88 rows=6 width=36) (actual time=0.005..0.005 rows=1 loops=1) |
Filter: (name ~~ 'A%'::text) |
-> Seq Scan on t1_v (cost=0.00..25.88 rows=6 width=36) (actual time=0.006..0.006 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_i (cost=0.00..25.88 rows=6 width=36) (actual time=0.005..0.005 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_u (cost=0.00..25.88 rows=6 width=36) (actual time=0.005..0.005 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 1 |
-> Seq Scan on t1_k (cost=0.00..25.88 rows=6 width=36) (actual time=0.005..0.005 rows=0 loops=1) |
Filter: (name ~~ 'A%'::text) |
Rows Removed by Filter: 1 |
Planning Time: 0.206 ms |
Execution Time: 0.117 ms |