mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 08:52:56 +00:00
Usage:
postgres=# \timing
Timing is on.
postgres=# select neon_seqscan_rel('pgbench_accounts', 1000);
INFO: scanning 491804 blocks, prefetch 1000
INFO: blk 0/491804
INFO: blk 1024/491804
INFO: blk 2048/491804
INFO: blk 3072/491804
...
INFO: blk 489472/491804
INFO: blk 490496/491804
INFO: blk 491520/491804
neon_seqscan_rel
------------------
(1 row)
Time: 57517.979 ms (00:57.518)
The second argument to the function is the number of pages to prefetch.
Note: the prefetching in this function works differently from the
prefetching we have for sequential scans in 'main'. After receiving the
result for a block, it immediately sends the request for the next page,
it doesn't send them in batches like 'main' does.