Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread Mischa Sandberg
Quoting Kris Jurka <[EMAIL PROTECTED]>: > On Wed, 4 May 2005, Mischa Sandberg wrote: > > > Copy makes better use of the TCP connection for transmission. COPY > uses > > the TCP connection like a one-way pipe. INSERT is like an RPC: the > > sender has to wait until the insert's return statu

Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread Tom Lane
Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: >> So what's the difference between a COPY and a batch of INSERT >> statements. Also, surely, fsyncs only occur at the end of a >> transaction, no need to fsync before a commit has been issued, right? > With COPY, the data being inserted itself

Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread Christopher Kings-Lynne
So what's the difference between a COPY and a batch of INSERT statements. Also, surely, fsyncs only occur at the end of a transaction, no need to fsync before a commit has been issued, right? With COPY, the data being inserted itself does not have to pass through the postgresql parser. Chris ---

Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread Kris Jurka
On Wed, 4 May 2005, Mischa Sandberg wrote: > Copy makes better use of the TCP connection for transmission. COPY uses > the TCP connection like a one-way pipe. INSERT is like an RPC: the > sender has to wait until the insert's return status roundtrips. Not true. A client may send any number of

Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread Christopher Petrilli
On 5/4/05, Mischa Sandberg <[EMAIL PROTECTED]> wrote: > Quoting David Roussel <[EMAIL PROTECTED]>: > > > > COPY invokes all the same logic as INSERT on the server side > > > (rowexclusive locking, transaction log, updating indexes, rules). > > > The difference is that all the rows are inserted as

Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread John A Meinel
David Roussel wrote: COPY invokes all the same logic as INSERT on the server side (rowexclusive locking, transaction log, updating indexes, rules). The difference is that all the rows are inserted as a single transaction. This reduces the number of fsync's on the xlog, which may be a limiting facto

Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread Mischa Sandberg
Quoting David Roussel <[EMAIL PROTECTED]>: > > COPY invokes all the same logic as INSERT on the server side > > (rowexclusive locking, transaction log, updating indexes, rules). > > The difference is that all the rows are inserted as a single > > transaction. This reduces the number of fsync's on

Re: [PERFORM] COPY vs INSERT

2005-05-04 Thread David Roussel
> COPY invokes all the same logic as INSERT on the server side > (rowexclusive locking, transaction log, updating indexes, rules). > The difference is that all the rows are inserted as a single > transaction. This reduces the number of fsync's on the xlog, > which may be a limiting factor for you.

[PERFORM] Table stats

2005-05-04 Thread Mike G.
Hello, I have a table collecting stats that shows 5 Index Tuples Fetched but no Index Scans. Should there not be at least one Index Scan showing in the stats? Mike ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PR

Re: [PERFORM]

2005-05-04 Thread Mike Rylander
On 5/3/05, Tom Lane <[EMAIL PROTECTED]> wrote: > Steven Rosenstein <[EMAIL PROTECTED]> writes: > > My question is, are there any advantages, drawbacks, or outright > > restrictions to using multiple simultaneous COPY commands to load data into > > the same table? > > It will work; not sure about w