[PERFORM] slow update of index during insert/copy

2008-08-31 Thread Thomas Finneid
Hi I am working on a table which stores up to 125K rows per second and I find that the inserts are a little bit slow. The insert is in reality a COPY of a chunk of rows, up to 125K. A COPY og 25K rows, without an index, is fast enough, about 150ms. With the index, the insert takes about 500ms

Re: [PERFORM] slow update of index during insert/copy

2008-08-31 Thread Scott Carey
You may want to investigate pg_bulkload. http://pgbulkload.projects.postgresql.org/ One major enhancement over COPY is that it does an index merge, rather than modify the index one row at a time. http://pgfoundry.org/docman/view.php/1000261/456/20060709_pg_bulkload.pdf On Sun, Aug 31, 2008 at

Re: [PERFORM] slow update of index during insert/copy

2008-08-31 Thread Thomas Finneid
Scott Carey wrote: You may want to investigate pg_bulkload. http://pgbulkload.projects.postgresql.org/ One major enhancement over COPY is that it does an index merge, rather than modify the index one row at a time. This is a command line tool, right? I need a jdbc driver tool, is that pos

Re: [PERFORM] slow update of index during insert/copy

2008-08-31 Thread Craig Ringer
Thomas Finneid wrote: > Hi > > I am working on a table which stores up to 125K rows per second and I > find that the inserts are a little bit slow. The insert is in reality a > COPY of a chunk of rows, up to 125K. A COPY og 25K rows, without an > index, is fast enough, about 150ms. With the index,