Re: Insert performance, what should I expect?
От
Rod Taylor
Тема
Re: Insert performance, what should I expect?
Дата
Msg-id
1098238348.747.20.camel@home
Ответ на
Insert performance, what should I expect? (Brock Henry)
Список
Дерево обсуждения
Insert performance, what should I expect? Brock Henry <brock.henry@gmail.com>
Re: Insert performance, what should I expect? Rod Taylor <pg@rbt.ca>
Re: Insert performance, what should I expect? Robert Creager <Robert_Creager@LogicalChaos.org>
Re: Insert performance, what should I expect? Rod Taylor <pg@rbt.ca>
Re: Insert performance, what should I expect? Andrew McMillan <andrew@catalyst.net.nz>
Re: Insert performance, what should I expect? "Matthew T. O'Connor" <matthew@zeut.net>
Re: Insert performance, what should I expect? Gaetano Mendola <mendola@bigfoot.com>
Re: Insert performance, what should I expect? "Steinar H. Gunderson" <sgunderson@bigfoot.com>
> I've done some manual benchmarking running my script 'time script.pl' > I realise my script uses some of the time, bench marking shows that > %50 of the time is spent in dbd:execute. The perl drivers don't currently use database level prepared statements which would give a small boost. But your best bet is to switch to using COPY instead of INSERT. Two ways to do this. 1) Drop DBD::Pg and switch to the Pg driver for Perl instead (non-DBI compliant) which has functions similar to putline() that allow COPY to be used. 2) Have your perl script output a .sql file with the data prepared (COPY statements) which you feed into the database via psql. You can probably achieve a 50% increase in throughput.
В списке pgsql-performance по дате отправления