Re: 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join) - Mailing list pgsql-performance

From Tom Lane
Subject Re: 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join)
Date
Msg-id 17739.1399893780@sss.pgh.pa.us
Whole thread Raw
In response to 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join)  (Tim Kane <tim.kane@gmail.com>)
Responses Re: 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join)  (Tim Kane <tim.kane@gmail.com>)
List pgsql-performance
Tim Kane <tim.kane@gmail.com> writes:
> Is there a propensity for 9.2.4 to prefer a sort-merge-join, in place of a
> hash join?

Not particularly; I don't think there's any actual difference in the cost
estimation equations between 9.2 and 9.3.  The two plans you show are
close enough in estimated cost that the ordering of their costs might be
coming out differently just as a matter of random variation in statistics.

It'd be worth double-checking the work_mem setting on both systems,
though, as (IIRC) an undersized work_mem hurts the estimate for hashes
more than for sorts.

            regards, tom lane


pgsql-performance by date:

Previous
From: Tim Kane
Date:
Subject: 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join)
Next
From: Tim Kane
Date:
Subject: Re: 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join)