Re: Insert performance, what should I expect?
Вложения
В списке pgsql-performance по дате отправления:
| От | Robert Creager |
|---|---|
| Тема | Re: Insert performance, what should I expect? |
| Дата | |
| Msg-id | 20041020104527.14927c06@thunder.mshome.net обсуждение |
| Ответ на | Re: Insert performance, what should I expect? (Rod Taylor <pg@rbt.ca>) |
| Ответы |
Re: Insert performance, what should I expect?
|
| Список | pgsql-performance |
When grilled further on (Tue, 19 Oct 2004 22:12:28 -0400), Rod Taylor <pg@rbt.ca> confessed: > > 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. > > > 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. COPY can be used with DBD::Pg, per a script I use: $dbh->do( "COPY temp_obs_$band ( $col_list ) FROM stdin" ); $dbh->func( join ( "\t", @data ) . "\n", 'putline' ); $dbh->func( "\\.\n", 'putline' ); $dbh->func( 'endcopy' ); With sets of data from 1000 to 8000 records, my COPY performance is consistent at ~10000 records per second. Cheers, Rob -- 10:39:31 up 2 days, 16:25, 2 users, load average: 2.15, 2.77, 3.06 Linux 2.6.5-02 #8 SMP Mon Jul 12 21:34:44 MDT 2004
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера