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?.
100000 rows affected
QUERY PLAN
WindowAgg (cost=0.29..6518.28 rows=100000 width=16) (actual time=0.172..216.004 rows=100000 loops=1)
  -> Index Scan using idx_foo on foo (cost=0.29..4768.28 rows=100000 width=12) (actual time=0.033..60.967 rows=100000 loops=1)
Planning time: 0.192 ms
Execution time: 221.219 ms
QUERY PLAN
WindowAgg (cost=0.29..10018.28 rows=100000 width=28) (actual time=0.029..154.940 rows=100000 loops=1)
  -> WindowAgg (cost=0.29..6518.28 rows=100000 width=20) (actual time=0.022..96.415 rows=100000 loops=1)
        -> Index Scan using idx_foo on foo (cost=0.29..4768.28 rows=100000 width=12) (actual time=0.016..46.127 rows=100000 loops=1)
Planning time: 0.076 ms
Execution time: 160.405 ms
QUERY PLAN
Function Scan on bar (cost=0.25..10.25 rows=1000 width=16) (actual time=151.188..182.898 rows=100000 loops=1)
Planning time: 0.025 ms
Execution time: 187.577 ms