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: | 2008-04-02 18:38:33 |
Message-ID: | 12337.1207161513@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"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
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Dwyer | 2008-04-02 21:04:22 | BUG #4085: No implicit cast after coalesce |
Previous Message | Pedro Gimeno | 2008-04-02 16:40:29 | Re: Re: BUG #4083: Return type of MAX and MIN of a VARCHAR column is TEXT |