From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tony Capobianco <tcapobianco@prospectiv.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Oracle v. Postgres 9.0 query performance
Date: Wed, 08 Jun 2011 13:03:49 -0400
Message-ID: <14544.1307552629@sss.pgh.pa.us> (raw)
In-Reply-To: <1307550486.1990.29.camel@tony1.localdomain>
References: <1307545892.1990.23.camel@tony1.localdomain>
<10260.1307547185@sss.pgh.pa.us>
<1307547634.1990.26.camel@tony1.localdomain>
<20110608155159.GA18128@tamriel.snowman.net>
<1307550486.1990.29.camel@tony1.localdomain>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, tcapobianco@prospectiv.com, sfrost@snowman.net
Subject: Re: Oracle v. Postgres 9.0 query performance
In-Reply-To: <14544.1307552629@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox