From: Tom Lane <tgl@sss.pgh.pa.us>
To: Luke Chambers <lukechambers7@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Inefficient Query Plans
Date: Wed, 23 Feb 2005 11:44:15 -0500
Message-ID: <20025.1109177055@sss.pgh.pa.us> (raw)
In-Reply-To: <1109110085.769681.93070@g14g2000cwa.googlegroups.com>
References: <1109110085.769681.93070@g14g2000cwa.googlegroups.com>
"Luke Chambers" <lukechambers7@gmail.com> writes:
> The following query plans both result from the very same query run on
> different servers. They obviously differ drastically, but I don't why
> as one db is a slonied copy of the other with identical postgresql.conf
> files.
There's an order-of-magnitude difference in the estimated row counts for
some of the joins, so it's hardly surprising that different plans would
be chosen. Assuming that these are exactly the same Postgres version,
the only explanation would be considerably different ANALYZE statistics
stored in the two databases.
> Both databases are vacuum analyzed nightly.
Maybe you should double-check that.
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, lukechambers7@gmail.com
Subject: Re: Inefficient Query Plans
In-Reply-To: <20025.1109177055@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