From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Mario Splivalo <mario.splivalo@megafon.hr>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Different query plans on same servers
Date: Tue, 06 Dec 2011 14:17:30 -0600
Message-ID: <4EDE23FA020000250004393F@gw.wicourts.gov> (raw)
In-Reply-To: <14289.1323201649@sss.pgh.pa.us>
References: <4EDE717A.9050604@megafon.hr>
<4EDE717A.9050604@megafon.hr>
<14289.1323201649@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I'd wonder first if you have the same statistics settings on both.
> The big problem here is that the estimation of the join size is
> bad (8588 versus 0).
But both servers develop that estimate for the join size. I was
wondering more about whether the costing factors were really the
same:
slow:
-> Nested Loop
(cost=0.00..792824.51 rows=8588 width=275)
(actual time=3269.997..3269.997 rows=0 loops=1)
versus fast:
-> Hash Join
(cost=857.00..31152.80 rows=8588 width=275)
(actual time=37.968..37.968 rows=0 loops=1)
The hash join path must look more expensive on the first machine,
for some reason.
Mario, could you post the result of running this query from both
servers?:
http://wiki.postgresql.org/wiki/Server_Configuration
-Kevin
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, mario.splivalo@megafon.hr, tgl@sss.pgh.pa.us
Subject: Re: Different query plans on same servers
In-Reply-To: <4EDE23FA020000250004393F@gw.wicourts.gov>
References: <4EDE717A.9050604@megafon.hr> <14289.1323201649@sss.pgh.pa.us> <4EDE23FA020000250004393F@gw.wicourts.gov>
* 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