starting vacuum...end.
postgres@gtm-01:~$ cat test.sql
\set nbranches :scale
\set ntellers 10 * :scale
\set naccounts 100000 * :scale
\set aid random(1, :naccounts)
\set bid random(1, :nbranches)
\set tid random(1, :ntellers)
\set delta random(-5000, 5000)
INSERT INTO pgbench_history (tid, bid, aid, delta, mtime) VALUES (:tid, :bid, :aid, :delta, CURRENT_TIMESTAMP);
Perfomance on cluster is less than on cluster.
If table not distributed i can see one time:
postgres=# select * from pgbench_history;
Time: 320.778 ms
then:
postgres=# SELECT create_distributed_table('pgbench_history', 'aid');
NOTICE: Copying data from local table...
NOTICE: copying the data has completed
DETAIL: The local data in the table is no longer visible, but is still on disk.
HINT: To remove the local data, run: SELECT truncate_local_data_after_distributing_table($$public.pgbench_history$$)
create_distributed_table
--------------------------
(1 row)
Time: 955.560 ms
and ...
postgres=# select * from pgbench_history;
Time: 1341.283 ms (00:01.341)
??? Time is increase!
What i have wrong doing?