| From: | Madyshev Egor <E(dot)Madyshev(at)ftdata(dot)ru> |
|---|---|
| To: | Boris Mironov <boris_mironov(at)outlook(dot)com> |
| Cc: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | RE: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY) |
| Date: | 2026-03-21 07:33:17 |
| Message-ID: | 0be0bc697d14458aa3f1f83e70a268de@localhost.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi, everybody
I took measurements of the performance of the modes at home and received
data corresponding to the data of the patch author. All measurements were
performed in the single transaction mode S (default mode). I took five
measurements each and got the average. I took measurements at the WSL.
------------------------------------------------
[ Client / Text mode ]
pgbench -i -Idtg -s1000
average table creation: 144.188 s
[ Client / Binary mode ]
pgbench -i -Idtc -s1000
average table creation: 105.914 s
[ Server / generate_series ]
pgbench -i -IdtG -s1000
average table creation: 265.912 s
[ Server / Unnest ]
pgbench -i -IdtU -s1000
average table creation: 279.508 s
------------------------------------------------
I also took measurements on a simple Linux machine available to me.
------------------------------------------------
[ Client / Text mode ]
pgbench -i -Idtg -s1000
average table creation: 130.524 s
[ Client / Binary mode ]
pgbench -i -Idtc -s1000
average table creation: 105.29 s
------------------------------------------------
In my measurements, binary mode turned out to be about 25% more productive.
Unnest mode is slightly slower than generate_series. Although WSL is not
the best environment for testing, it was the closest option at hand.
Measurements on a separate Linux machine confirmed the results. The overall
performance changes correspond to the author's measurements.
Best regards,
Egor
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-03-21 07:42:11 | Re: Remove inner joins based on foreign keys |
| Previous Message | Tom Lane | 2026-03-21 06:34:00 | Re: pg_waldump: support decoding of WAL inside tarfile |