"Pavel Golub" <[EMAIL PROTECTED]> writes:
> Comparing 8.3.1 to 8.2.5 release INSERT of >1000 rows is very slow.

> INSERT INTO numbers (numberint, numberstr) VALUES (1, 'One');
> INSERT INTO numbers (numberint, numberstr) VALUES (2, 'Two');
> INSERT INTO numbers (numberint, numberstr) VALUES (3, 'Three');
> ...
> INSERT INTO numbers (numberint, numberstr) VALUES (1000, 'One thousand');

Fixed for 8.3.2.  In the meantime, you might consider modifying your
application to do this as a single insert instead:

INSERT INTO numbers (numberint, numberstr) VALUES
   (1, 'One'),
   (2, 'Two'),
   (3, 'Three'),
   ...
   (1000, 'One thousand')

A quick test says that this way is between three and four times faster,
even without considering the impact of the problem you're complaining
about.

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to