Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread Heikki Linnakangas
andrew klassen wrote: I am using the c-library interface and for these particular transactions I preload PREPARE statements. Then as I get requests, I issue a BEGIN, followed by at most 300 EXECUTES and then a COMMIT. That is the general scenario. What value beyond 300 should I try? Make sure

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread Tom Lane
andrew klassen <[EMAIL PROTECTED]> writes: > I am using the c-library interface and for these particular transactions > I preload PREPARE statements. Then as I get requests, I issue a BEGIN, > followed by at most 300 EXECUTES and then a COMMIT. That is the > general scenario. What value beyond 300

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread PFC
ze of the table+indexes when it gets slow ? - Original Message From: James Mansion <[EMAIL PROTECTED]> To: andrew klassen <[EMAIL PROTECTED]> Cc: pgsql-performance@postgresql.org Sent: Wednesday, June 4, 2008 3:20:26 PM Subject: Re: [PERFORM] insert/update tps slow with i

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread andrew klassen
involves file I/O) improve the above scenario? Thanks. - Original Message From: James Mansion <[EMAIL PROTECTED]> To: andrew klassen <[EMAIL PROTECTED]> Cc: pgsql-performance@postgresql.org Sent: Wednesday, June 4, 2008 3:20:26 PM Subject: Re: [PERFORM] insert/update tps slow wit

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread James Mansion
andrew klassen wrote: I'll try adding more threads to update the table as you suggest. You could try materially increasing the update batch size too. As an exercise you could see what the performance of COPY is by backing out the data and reloading it from a suitable file. -- Sent via pgsql

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread James Mansion
Matthew Wakeling wrote: If you're running a "work queue" architecture, that probably means you only have one thread doing all the updates/inserts? It might be worth going multi-threaded, and issuing inserts and updates through more than one connection. Postgres is designed pretty well to scale

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread andrew klassen
t;[EMAIL PROTECTED]> To: pgsql-performance@postgresql.org Sent: Wednesday, June 4, 2008 10:10:38 AM Subject: Re: [PERFORM] insert/update tps slow with indices on table > 1M rows On Wed, 4 Jun 2008, andrew klassen wrote: > I am using multiple threads, but only one worker thread for insert/u

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread Matthew Wakeling
On Wed, 4 Jun 2008, andrew klassen wrote: I am using multiple threads, but only one worker thread for insert/updated to this table. I don't mind trying to add multiple threads for this table, but my guess is it would not help because basically the overall tps rate is decreasing so dramatically.

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread andrew klassen
sen <[EMAIL PROTECTED]> Cc: pgsql-performance@postgresql.org Sent: Wednesday, June 4, 2008 5:31:22 AM Subject: Re: [PERFORM] insert/update tps slow with indices on table > 1M rows On Tue, 3 Jun 2008, andrew klassen wrote: > Basically, I have a somewhat constant rate of inserts/updates that go

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-04 Thread Matthew Wakeling
On Tue, 3 Jun 2008, andrew klassen wrote: Basically, I have a somewhat constant rate of inserts/updates that go into a work queue and then get passed to postgres. The cpu load is not that high, i.e. plenty of idle cpu. I am running an older version of freebsd and the iostat output is not very

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-03 Thread Scott Marlowe
On Tue, Jun 3, 2008 at 4:36 PM, andrew klassen <[EMAIL PROTECTED]> wrote: > The cpu load is not that high, i.e. plenty of idle cpu. I am running an > older > version of freebsd and the iostat output is not very detailed. > During this time, the number is low < 10Mbs. The system has an > LSI Logic

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-03 Thread andrew klassen
3, 2008 7:15:10 PM Subject: Re: [PERFORM] insert/update tps slow with indices on table > 1M rows On Wed, 04 Jun 2008 00:36:09 +0200, andrew klassen <[EMAIL PROTECTED]>  wrote: > Running postgres 8.2.5 >   > I have a table that has 5 indices, no foreign keys or any > depende

Re: [PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-03 Thread PFC
On Wed, 04 Jun 2008 00:36:09 +0200, andrew klassen <[EMAIL PROTECTED]> wrote: Running postgres 8.2.5   I have a table that has 5 indices, no foreign keys or any dependency on any other table. If delete the database and start entering entries, everything works very well until I get to some poin

[PERFORM] insert/update tps slow with indices on table > 1M rows

2008-06-03 Thread andrew klassen
Running postgres 8.2.5   I have a table that has 5 indices, no foreign keys or any dependency on any other table. If delete the database and start entering entries, everything works very well until I get to some point (let's say 1M rows). Basically, I have a somewhat constant rate of inserts/upda