Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pgbench scripts for range partitioning
\set var random(1, 1000 * :partitions)
BEGIN;
SELECT * FROM abc WHERE a = :var;
END;
\set start random(1, :partitions) * 1000
BEGIN;
SELECT * FROM abc WHERE a >= :start and a < :start + 1000;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.