> Marc, I am using postgres 9.4. I didn't benchmark, but intuitively the modulo operator will force traversing every
recordin table "a" 4 times, as it can't use an index.
Not necessarily. seq scans can be synchronized:
"This allows sequential scans of large tables to synchronize with each other, so that concurrent scans read the same
blockat about the same time and hence share the I/O workload. When this is enabled, a scan might start in the middle of
thetable and then "wrap around" the end to cover all rows, so as to synchronize with the activity of scans already in
progress.This can result in unpredictable changes in the row ordering returned by queries that have no ORDER BY
clause."
Marc