February 2020
Intermediate to advanced
734 pages
38h 13m
English
All queries in this recipe should be performed by the bench_user mapped user in the pgbench database on the pg-report PostgreSQL server. Follow these steps:
EXPLAIN VERBOSE SELECT aid, bid, abalance FROM pgbench_accounts WHERE aid BETWEEN 500000 AND 500004;
EXPLAIN VERBOSE SELECT sum(abalance) FROM pgbench_accounts WHERE aid BETWEEN 500000 AND 500004;
EXPLAIN VERBOSE SELECT a2.aid, a2.bid, a2.abalance FROM pgbench_accounts a1 JOIN pgbench_accounts a2 USING (aid) WHERE a1.aid BETWEEN 500000 AND ...
Read now
Unlock full access