On 27/06/11 15:05, Pavel Stehule wrote: > exec('begin'); > for(i = 0; i < 1000; i++) > exec("insert into foo values($1), itoa(i)); > exec('commit');
You can probably also benefit from multi-valued INSERTs, though I haven't verified this. INSERT INTO foo VALUES (1,'joe','dean'), (4,'fred','bob'), (11,'anne','smith'); There'll be a threshhold above which the COPY protocol becomes faster, though. -- Craig Ringer -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql