Re: Inefficient Query Plans - Mailing list pgsql-performance

From Tom Lane
Subject Re: Inefficient Query Plans
Date
Msg-id 20025.1109177055@sss.pgh.pa.us
Whole thread Raw
In response to Inefficient Query Plans  ("Luke Chambers" <lukechambers7@gmail.com>)
List pgsql-performance
"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

pgsql-performance by date:

Previous
From: John Allgood
Date:
Subject: Peformance Tuning Opterons/ Hard Disk Layout
Next
From: Tom Lane
Date:
Subject: Re: subquery vs join on 7.4.5