Re: plpgsql arrays - Mailing list pgsql-performance

From Matthew Wakeling
Subject Re: plpgsql arrays
Date
Msg-id alpine.DEB.2.00.0904061222590.791@aragorn.flymine.org
Whole thread Raw
In response to Re: plpgsql arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Fri, 3 Apr 2009, Tom Lane wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
>> On Fri, 2009-04-03 at 10:04 -0400, Tom Lane wrote:
>>> I don't actually believe that a standard merge join algorithm will work
>>> with an intransitive join condition ...
>
>> I think it's a common enough problem that having a non-standard join
>> algorithm written for that case would be interesting indeed.
>
> Sounds like a great PhD thesis topic.

I agree it'd be very cool to have a non-standard join algorithm for this
built into Postgres. However it is nowhere near complicated enough for a
PhD thesis topic.

I'm just putting the finishing touches on a plpgsql implementation - in
order to perform the join on a asymmetric set of ranges, you just need to
keep two separate history lists as you sweep through the two incoming
streams. This would be sufficient for range constraints.

Matthew

--
Surely the value of C++ is zero, but C's value is now 1?
  -- map36, commenting on the "No, C++ isn't equal to D. 'C' is undeclared
  [...] C++ should really be called 1" response to "C++ -- shouldn't it
  be called D?"

pgsql-performance by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: probelm with alter table add constraint......
Next
From: Mario Splivalo
Date:
Subject: Re: Forcing seq_scan off for large table joined with tiny table yeilds improved performance