Re: same query different execution plan (hash join vs. semi-hash join)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Huang, Suya" <Suya(dot)Huang(at)au(dot)experian(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: same query different execution plan (hash join vs. semi-hash join)
Date: 2014-05-19 14:22:17
Message-ID: 868.1400509337@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Huang, Suya" <Suya(dot)Huang(at)au(dot)experian(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2014-05-19 14:50:30 Re: Query plan good in 8.4, bad in 9.2 and better in 9.3
Previous Message David Rowley 2014-05-19 07:19:17 Re: View has different query plan than select statement