Re: [PERFORM] Abnormal performance difference between Postgres and MySQL

2009-02-26 Thread Claus Guttesen
> The execution time has not improved. I am going to increase the > shared_buffers now keeping the work_mem same. Have you performed a vacuum analyze? -- regards Claus When lenity and cruelty play for a kingdom, the gentler gamester is the soonest winner. Shakespeare -- Sent via pgsql-perfor

Re: [PERFORM] Abnormal performance difference between Postgres and MySQL

2009-02-26 Thread Akos Gabriel
Thu, 26 Feb 2009 09:00:07 +0100 -n Claus Guttesen írta: > > The execution time has not improved. I am going to increase the > > shared_buffers now keeping the work_mem same. > > Have you performed a vacuum analyze? > and reindex -- Üdvözlettel, Gábriel Ákos -=E-Mail :akos.gabr...@i-logic.hu|

Re: [PERFORM] Abnormal performance difference between Postgres and MySQL

2009-02-26 Thread Farhan Husain
On Wed, Feb 25, 2009 at 4:10 PM, Kevin Grittner wrote: > >>> Farhan Husain wrote: > > The machine postgres is running on has 4 GB of RAM. > > In addition to the other suggestions, you should be sure that > effective_cache_size is set to a reasonable value, which would > probably be somewhere in

Re: [PERFORM] Abnormal performance difference between Postgres and MySQL

2009-02-26 Thread Farhan Husain
On Wed, Feb 25, 2009 at 6:07 PM, Scott Carey wrote: > I will second Kevin’s suggestion. Unless you think you will have more > than a few dozen concurrent queries, start with work_mem around 32MB. > For the query here, a very large work_mem might help it hash join depending > on the data... But t

Re: [PERFORM] Abnormal performance difference between Postgres and MySQL

2009-02-26 Thread Kevin Grittner
>>> Farhan Husain wrote: > Thanks a lot Scott! I think that was the problem. I just changed the > default statistics target to 50 and ran explain. The plan changed > and I ran explain analyze. Now it takes a fraction of a second! Yeah, the default of 10 has been too low. In 8.4 it is being rai

Re: [PERFORM] Abnormal performance difference between Postgres and MySQL

2009-02-26 Thread Scott Marlowe
On Thu, Feb 26, 2009 at 12:10 PM, Steve Clark wrote: > > Can this be set in the postgresql.conf file? > default_statistics_target = 50 Yep. It will take affect after a reload and after the current connection has been reset. If you want to you also set a default for a database or a role. Fine t

Re: [PERFORM] Abnormal performance difference between Postgres and MySQL

2009-02-26 Thread Steve Clark
Kevin Grittner wrote: Farhan Husain wrote: Thanks a lot Scott! I think that was the problem. I just changed the default statistics target to 50 and ran explain. The plan changed and I ran explain analyze. Now it takes a fraction of a second! Yeah, the default of 10 has been too low. In 8.4 i