pgbench - add minimal stats on initialization

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: radydoug(at)amazon(dot)com
Subject: pgbench - add minimal stats on initialization
Date: 2019-04-06 16:26:30
Message-ID: alpine.DEB.2.21.1904061810510.3678@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello devs,

The attached patch adds minimal stats during the initialization phase.
Such a feature was already submitted by Doug Rady two years ago,

https://commitfest.postgresql.org/15/1308/

but it needed to be adapted to the -I custom initialization approach
developed in the same CF, and it ended 'returned with feedback'.

sh> ./pgbench -i -s 3
dropping old tables...
creating tables...
generating data...
100000 of 300000 tuples (33%) done (elapsed 0.09 s, remaining 0.18 s)
200000 of 300000 tuples (66%) done (elapsed 0.20 s, remaining 0.10 s)
300000 of 300000 tuples (100%) done (elapsed 0.32 s, remaining 0.00 s)
vacuuming...
creating primary keys...
done in 0.68 s (drop 0.06 s, create table 0.02 s, generate 0.34 s, vacuum 0.13 s, primary keys 0.13 s).

See the durations on the last line.

The intent is to test the initialization phase more precisely, and
possibly accelerate it. For instance, is it better to do vacuum before or
after primary keys?

--
Fabien.

Attachment Content-Type Size
pgbench-init-stats-1.patch text/x-diff 1.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-04-06 16:31:11 pgbench - extend initialization phase control
Previous Message Tom Lane 2019-04-06 15:46:02 Re: fix for BUG #3720: wrong results at using ltree