Re: BUG #4079: libpq.dll very slow (unusable)
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: "Pavel Golub" <pavel(at)microolap(dot)com>
- Cc: pgsql-bugs(at)postgresql(dot)org
- Subject: Re: BUG #4079: libpq.dll very slow (unusable)
- Date: Wed, 02 Apr 2008 14:38:33 -0400
- Message-id: <12337(dot)1207161513(at)sss(dot)pgh(dot)pa(dot)us>
"Pavel Golub" <pavel(at)microolap(dot)com> 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
Home |
Main Index |
Thread Index