| От | Tom Lane |
|---|---|
| Тема | Re: Parsing speed (was Re: pgstats_initstats() cost) |
| Дата | |
| Msg-id | 16303.1060720653@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Parsing speed (was Re: pgstats_initstats() cost) (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
> Rod Taylor <rbt@rbt.ca> writes:
>> Do you happen to have any numbers comparing prepared inserts in a single
>> transaction against copy?
> COPY is about a factor of 6 faster, it appears. I got 11.8 versus
> 1.87 seconds for loading the same amount of data (with the 3-column
> test table). So COPY's not gonna go away any time soon.
BTW, that was on a local Unix-socket connection. On a network
connection, COPY would have a huge advantage because (a) it could
transfer multiple rows per packet, if your rows are not too long,
and (b) you would not have to wait for the server to answer back
before sending the next packet.
In theory you could pipeline INSERT commands like that too, but not
with libpq.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера