[PERFORM] A query become very slow after upgrade from 8.1.10 to 8.4.5

2010-11-01 Thread Yaocl
Hi Sorry, my previous post haven't shown in this list, so I repost this one. I have a sql become very slow after upgrade to 8.4.5. The table creation sql like this. begin; CREATE TABLE t_a ( id INT NOT NULL PRIMARY KEY ); CREATE TABLE t_b ( id INT NOT NULL PRIMARY KEY ); CREATE TA

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Andres Freund
On Monday 01 November 2010 15:28:19 Divakar Singh wrote: > Do you mean these parameters have been removed starting 9.X? > As I see on > http://www.network-theory.co.uk/docs/postgresql/vol3/BackgroundWriter.html > ,these parameters were added starting from 8.0 right? No, I mean setting to 0 is a b

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Divakar Singh
Do you mean these parameters have been removed starting 9.X? As I see on http://www.network-theory.co.uk/docs/postgresql/vol3/BackgroundWriter.html ,these parameters were added starting from 8.0 right? Best Regards, Divakar From: Andres Freund To: Divakar

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Andres Freund
On Monday 01 November 2010 15:16:49 Divakar Singh wrote: > I am using 9.0.1 Either thats not true or you cargo culted loads of your config from a significantly older pg version. Things like: #bgwriter_delay = 200# 10-1 milliseconds between rounds bgwriter_lru_percent = 0#

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Divakar Singh
I am using 9.0.1 Best Regards, Divakar From: Andres Freund To: Divakar Singh Cc: pgsql-performance@postgresql.org Sent: Mon, November 1, 2010 7:44:31 PM Subject: Re: [PERFORM] Insert performance with composite index On Monday 01 November 2010 15:08:10 Divak

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Andres Freund
On Monday 01 November 2010 15:08:10 Divakar Singh wrote: > here are my parameters: Which pg version is that? -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Andres Freund
Hi, On Monday 01 November 2010 13:49:14 Divakar Singh wrote: > When I tried inserting 1M rows into a table with a Primary Key, it took > almost 62 seconds. > After adding a composite index of 2 columns, the performance degrades to > 125 seconds. > I am using COPY to insert all data in 1 transactio

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Cédric Villemain
2010/11/1 Divakar Singh : > Hi, > I am trying to tune my libpq program for insert performance. > When I tried inserting 1M rows into a table with a Primary Key, it took > almost 62 seconds. > After adding a composite index of 2 columns, the performance degrades to 125 > seconds. > I am using COPY t

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Marti Raudsepp
On Mon, Nov 1, 2010 at 14:56, Divakar Singh wrote: > Thanks for your tips. i will try those. > I am on Solaris Sparc 5.10 Sorry, I assumed you were running Linux. But still it could be the same problem as I had. Be careful changing your wal_sync_method, as it has the potential to corrupt your da

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Marti Raudsepp
On Mon, Nov 1, 2010 at 14:49, Divakar Singh wrote: > I am trying to tune my libpq program for insert performance. > When I tried inserting 1M rows into a table with a Primary Key, it took > almost 62 seconds. > After adding a composite index of 2 columns, the performance degrades to 125 > seconds.

Re: [PERFORM] Insert performance with composite index

2010-11-01 Thread Divakar Singh
Hi Marti, Thanks for your tips. i will try those. I am on Solaris Sparc 5.10 Best Regards, Divakar From: Marti Raudsepp To: Divakar Singh Cc: pgsql-performance@postgresql.org Sent: Mon, November 1, 2010 6:23:17 PM Subject: Re: [PERFORM] Insert performance wi

[PERFORM] Insert performance with composite index

2010-11-01 Thread Divakar Singh
Hi, I am trying to tune my libpq program for insert performance. When I tried inserting 1M rows into a table with a Primary Key, it took almost 62 seconds. After adding a composite index of 2 columns, the performance degrades to 125 seconds. I am using COPY to insert all data in 1 transaction. t