On 1 December 2011 04:00, David Johnston <polobo@yahoo.com> wrote:
> On Nov 30, 2011, at 18:44, Craig Ringer <ringerc@ringerc.id.au> wrote:
>
>> On 11/30/2011 10:32 PM, Sergey Konoplev wrote:
> Insert into tbl values(...); [times 50]
> insert into tbl values (...), (...), (...), ...; [ once with 50 values ]
> Copy [ with 50 input rows provided ]
>
> I would presume the first one is badly performing but no idea whether the multi-value version of insert would be
outperformedby an equivalent Copy command (both on the main query and during replication)
>
> Though, does auto-commit affect the results in the first case; I.e., without auto-commit do the first two results
replicateequivalently?
So the guaranteed solutions are either
BEGIN;
INSERT INTO table1 VALUES (...), (...), ...;
COMMIT;
or
COPY FROM ...;
correct?
>
>>
> David J
--
Sergey Konoplev
Blog: http://gray-hemp.blogspot.com
LinkedIn: http://ru.linkedin.com/in/grayhemp
JID/GTalk: gray.ru@gmail.com Skype: gray-hemp