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?.
SELECT 50000
count min max
50000 2018-01-01 2018-12-31
SELECT 1
CREATE FUNCTION
CREATE FUNCTION
QUERY PLAN
Seq Scan on public.test (cost=0.00..1354.20 rows=56610 width=4) (actual time=8.601..50.223 rows=50000 loops=1)
  Output: (to_char((d)::timestamp with time zone, 'MMDD'::text))::integer
Planning time: 0.550 ms
Execution time: 52.148 ms
EXPLAIN
QUERY PLAN
Seq Scan on public.test (cost=0.00..14940.60 rows=56610 width=4) (actual time=0.068..246.538 rows=50000 loops=1)
  Output: f_mmdd_tc_i(d)
Planning time: 0.085 ms
Execution time: 249.778 ms
EXPLAIN