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?.
setseed
SELECT 1
CREATE TABLE
CREATE INDEX
INSERT 0 200000
CREATE FUNCTION
QUERY PLAN
Function Scan on public.filez_up_to_limit (cost=0.25..10.25 rows=1000 width=44) (actual time=6.680..6.791 rows=1978 loops=1)
  Output: id, name, size
  Function Call: filez_up_to_limit('1000000'::numeric, 0)
Planning Time: 0.037 ms
Execution Time: 6.961 ms
EXPLAIN
QUERY PLAN
Function Scan on public.filez_up_to_limit (cost=0.25..10.25 rows=1000 width=44) (actual time=38.977..40.305 rows=20111 loops=1)
  Output: id, name, size
  Function Call: filez_up_to_limit('10000000'::numeric, 0)
Planning Time: 0.020 ms
Execution Time: 41.382 ms
EXPLAIN