Re: Oracle v. Postgres 9.0 query performance - Mailing list pgsql-performance

From Tom Lane
Subject Re: Oracle v. Postgres 9.0 query performance
Date
Msg-id 14544.1307552629@sss.pgh.pa.us
Whole thread Raw
In response to Re: Oracle v. Postgres 9.0 query performance  (Tony Capobianco <tcapobianco@prospectiv.com>)
Responses Re: Oracle v. Postgres 9.0 query performance  (Tony Capobianco <tcapobianco@prospectiv.com>)
List pgsql-performance
Tony Capobianco <tcapobianco@prospectiv.com> writes:
> Well, this ran much better.  However, I'm not sure if it's because of
> set enable_nestloop = 0, or because I'm executing the query twice in a
> row, where previous results may be cached.  I will try this setting in
> my code for when this process runs later today and see what the result
> is.

If the performance differential holds up, you should look at adjusting
your cost parameters so that the planner isn't so wrong about which one
is faster.  Hacking enable_nestloop is a band-aid, not something you
want to use in production.

Looking at the values you gave earlier, I wonder whether the
effective_cache_size setting isn't unreasonably high.  That's reducing
the estimated cost of accessing the large table via indexscans, and
I'm thinking it reduced it too much.

            regards, tom lane

pgsql-performance by date:

Previous
From: John Williams
Date:
Subject: Re: Set of related slow queries
Next
From: Pavel Stehule
Date:
Subject: Re: Oracle v. Postgres 9.0 query performance