Re: v7.2.3 versus v7.3 -> huge performance penalty for JOIN with UNION

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Frank van Vugt" <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
Cc: Postgresql performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: v7.2.3 versus v7.3 -> huge performance penalty for JOIN with UNION
Date: 2002-12-03 14:35:16
Message-ID: 23156.1038926116@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Frank van Vugt" <ftm(dot)van(dot)vugt(at)foxi(dot)nl> writes:
> Since the left side of the join clause is composed out of three concatenated
> text-parts resulting in one single piece of type text, I'd expect the
> planner to avoid the nested loop.

Probably not, since the first thing it does is to flatten the
sub-select, leaving it with a concatenation expression in the
WHERE-clause. (I was too sleepy last night to realize that you
were comparing a concatenation to old_id, rather than making two
separate comparisons :-()

We really need to fix the planner to be able to do merge/hash on
"arbitrary expression = arbitrary expression", not only "Var = Var".
IIRC, this is doable in principle, but there are a few routines that
would need to be improved.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Frank van Vugt 2002-12-03 15:23:51 Re: v7.2.3 versus v7.3 -> huge performance penalty for JOIN with UNION
Previous Message Nikk Anderson 2002-12-03 13:41:14 Re: Is there any limitations