pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Huang, Suya <Suya.Huang@au.experian.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: same query different execution plan (hash join vs. semi-hash join)
Date: Mon, 19 May 2014 10:22:17 -0400
Message-ID: <868.1400509337@sss.pgh.pa.us> (raw)
In-Reply-To: <D83E55F5F4D99B4A9B4C4E259E6227CD01499446@AUX1EXC01.apac.experian.local>
References: <D83E55F5F4D99B4A9B4C4E259E6227CD01498C88@AUX1EXC01.apac.experian.local>
	<21694.1400209082@sss.pgh.pa.us>
	<D83E55F5F4D99B4A9B4C4E259E6227CD01499446@AUX1EXC01.apac.experian.local>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

"Huang, Suya" <Suya.Huang@au.experian.com> writes:
> Thank you Tom. But the time spent on scanning table test1 is less than 1 second (91.738 compares to 87.869), so I guess this shouldn't be the issue?

No, the point is that the bad rowcount estimate (and, possibly, lack of
stats about join column contents) causes the planner to pick a join method
that's not ideal for this query.

			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



view thread (5+ messages)  latest in thread

Message-ID: <868.1400509337@sss.pgh.pa.us>
Permalink:  ../868.1400509337@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/868.1400509337@sss.pgh.pa.us

 · 

reply

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, Suya.Huang@au.experian.com
  Subject: Re: same query different execution plan (hash join vs. semi-hash join)
  In-Reply-To: <868.1400509337@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