Re: Different query plans on same servers - Mailing list pgsql-performance

From Kevin Grittner
Subject Re: Different query plans on same servers
Date
Msg-id 4EDE23FA020000250004393F@gw.wicourts.gov
Whole thread Raw
In response to Re: Different query plans on same servers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Different query plans on same servers
Re: Different query plans on same servers
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Different query plans on same servers
Next
From: "Kevin Grittner"
Date:
Subject: Re: Different query plans on same servers