| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
|---|---|
| To: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | pgbench - allow to create partitioned tables |
| Date: | 2019-07-23 18:26:17 |
| Message-ID: | alpine.DEB.2.21.1907230826190.7008@lancre |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello devs,
While doing some performance tests and reviewing patches, I needed to
create partitioned tables. Given the current syntax this is time
consumming.
The attached patch adds two options to create a partitioned "account"
table in pgbench.
It allows to answer quickly simple questions, eg "what is the overhead of
hash partitioning on a simple select on my laptop"? Answer:
# N=0..?
sh> pgench -i -s 1 --partition-number=$N --partition-type=hash
# then run
sh> pgench -S -M prepared -P 1 -T 10
# and look at latency:
# no parts = 0.071 ms
# 1 hash = 0.071 ms (did someone optimize this case?!)
# 2 hash ~ 0.126 ms (+ 0.055 ms)
# 50 hash ~ 0.155 ms
# 100 hash ~ 0.178 ms
# 150 hash ~ 0.232 ms
# 200 hash ~ 0.279 ms
# overhead ~ (0.050 + [0.0005-0.0008] * nparts) ms
--
Fabien.
| Attachment | Content-Type | Size |
|---|---|---|
| pgbench-init-partitioned-1.patch | text/x-diff | 9.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Borodin | 2019-07-23 18:59:00 | Re: Fetching timeline during recovery |
| Previous Message | Jeevan Ladhe | 2019-07-23 17:48:50 | Re: block-level incremental backup |