Re: [BUGS] New hashed IN code ignores distinctiveness of subquery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bradley Baetz <bbaetz(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] New hashed IN code ignores distinctiveness of subquery
Date: 2003-01-27 21:29:52
Message-ID: 8193.1043702992@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Bradley Baetz <bbaetz(at)acm(dot)org> writes:
> Hmm. OK, I poked through the code a bit more, and I think I now realise
> why we were talking across each other. I've attached a 'patch' which
> gets the mergejoin counts down to something reasonable.

I've just committed a significant set of changes in the join cost
estimation routines. On looking closer, they hadn't been upgraded for
any of the recent changes --- they were still assuming that merge and
hash join clauses could only be simple var = var, for instance. I did
something about the mergejoin rescan issue, as well as modeling JOIN
short-circuiting. All of the estimates are a bit crude, but certainly
better than no model at all.

I think this covers your concerns, though I'm still worried about
whether it's okay to use the existing selectivity routines to compute
selectivities in the JOIN_IN/JOIN_UNIQUE case.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2003-01-27 21:34:04 Re: Bug #880: COMMENT ON DATABASE depends on current database
Previous Message Peter Eisentraut 2003-01-27 21:11:26 Re: Bug #880: COMMENT ON DATABASE depends on current database

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-01-27 21:32:14 Re: IPv6 patch
Previous Message Rod Taylor 2003-01-27 21:20:56 Re: Request for qualified column names