Re: Abnormal performance difference between Postgres and MySQL

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Farhan Husain" <russoue(at)gmail(dot)com>, "Scott Carey" <scott(at)richrelevance(dot)com>
Cc: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Abnormal performance difference between Postgres and MySQL
Date: 2009-02-26 18:09:54
Message-ID: 49A68692.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>> Farhan Husain <russoue(at)gmail(dot)com> 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 raised
to 100.

> Thanks to all of you who wanted to help me. I would be happy if
> someone does me one last favor. I want to know how these query plans
> are generated and how the parameters you suggested to change affects
> it. If there is any article, paper or book on it please give me the
> name or url.

In terms of tuning in general, you might start with these:

http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server

http://www.postgresql.org/docs/8.3/interactive/runtime-config-query.html

To understand the mechanics of the optimizer you might be best off
downloading the source code and reading through the README files and
comments in the source code.

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Steve Clark 2009-02-26 19:10:29 Re: Abnormal performance difference between Postgres and MySQL
Previous Message Farhan Husain 2009-02-26 17:45:26 Re: Abnormal performance difference between Postgres and MySQL