Hello Tatsuo-san,

Currently pgbench uses plain COPY to populate pgbench_accounts
table. With adding FREEZE option to COPY, the time to perform "pgbench
-i" will be significantly reduced.

Curent master:
pgbench -i -s 100
done in 70.78 s (drop tables 0.21 s, create tables 0.02 s, client-side generate 
12.42 s, vacuum 51.11 s, primary keys 7.02 s).

Using FREEZE:
done in 16.86 s (drop tables 0.20 s, create tables 0.01 s, client-side generate 
11.86 s, vacuum 0.25 s, primary keys 4.53 s).

That looks good!

As COPY FREEZE was introduced in 9.3, this means that loading data would break with previous versions. Pgbench attempts at being compatible with older versions. I'm wondering whether we should not care or if we should attempt some compatibility layer. It seems enough to test "PQserverVersion() >= 90300"?

--
Fabien.


Reply via email to