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?.
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) select 1641394918760185856/1000000 as ii
QUERY PLAN |
---|
Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1) |
Output: '1641394918760'::bigint |
Planning Time: 0.191 ms |
Execution Time: 3.339 ms |
EXPLAIN
EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS) select cast(cast(1641394918760185856 as varchar(13)) as bigint) as ii
QUERY PLAN |
---|
Result (cost=0.00..0.01 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1) |
Output: '1641394918760'::bigint |
Planning: |
Buffers: shared hit=12 read=3 |
Planning Time: 0.170 ms |
Execution Time: 0.009 ms |
EXPLAIN