On 7 Jul 2017, at 21:53, Peter Geoghegan <pg@bowt.ie> wrote:
Is it possible for you to instrument the number of B-Tree page accesses using custom instrumentation for pgbench_accounts_pkey?
If that seems like too much work, then it would still be interesting to see what the B-Tree keyspace looks like before and after varying the "nclient" count from, say, 32 to 128. Maybe there is a significant difference in how balanced or skewed it is in each case. Or, the index could simply be more bloated.
There is a query that I sometimes use, that itself uses pageinspect, to summarize the keyspace quickly. It shows you the highkey for every internal page, starting from the root and working down to the lowest internal page level (the one just before the leaf level -- level 1), in logical/keyspace order. You can use it to visualize the distribution of values. It could easily include the leaf level, too, but that's less interesting and tends to make the query take ages. I wonder what the query will show here.
Here is the query: …
I am attaching results of query that you sent. It shows that there is nothing have changed after executing tests.
—
Thanks and Regards, Alik Khilazhev Postgres Professional: http://www.postgrespro.com The Russian Postgres Company