From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Kane <tim.kane@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join)
Date: Mon, 12 May 2014 07:23:00 -0400
Message-ID: <17739.1399893780@sss.pgh.pa.us> (raw)
In-Reply-To: <CF9664D0.7CB56%tim.kane@gmail.com>
References: <CF9664D0.7CB56%tim.kane@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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, tim.kane@gmail.com
Subject: Re: 9.2.4 vs 9.3.0 query planning (sort merge join vs hash join)
In-Reply-To: <17739.1399893780@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