pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Matthew Wakeling <matthew@flymine.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: plpgsql arrays
Date: Mon, 6 Apr 2009 10:36:50 -0400
Message-ID: <603c8f070904060736s1a4e7868r5a1b6a5bbe8a2f26@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0904061338110.791@aragorn.flymine.org>
References: <alpine.DEB.2.00.0904031420470.21772@aragorn.flymine.org>
	<603c8f070904030647u1c92e13ew53612ac0011ed7c1@mail.gmail.com>
	<alpine.DEB.2.00.0904031455210.21772@aragorn.flymine.org>
	<28595.1238767442@sss.pgh.pa.us>
	<1238779839.5444.220.camel@ebony.2ndQuadrant>
	<alpine.DEB.2.00.0904061338110.791@aragorn.flymine.org>

On Mon, Apr 6, 2009 at 8:52 AM, Matthew Wakeling <matthew@flymine.org> wrote:
> On Fri, 3 Apr 2009, Simon Riggs wrote:
>>
>> On Fri, 2009-04-03 at 10:04 -0400, Tom Lane wrote:
>>>
>>> Matthew Wakeling <matthew@flymine.org> writes:
>>>>
>>>> On Fri, 3 Apr 2009, Robert Haas wrote:
>>>>>
>>>>> Why not just use SQL to do the join?
>>>>
>>>> Because the merge condition is:
>>>>
>>>> WHERE l1.start <= l2.end AND l2.start <= l1.end
>>>>
>>>> and merge joins in postgres only currently cope with the case where the
>>>> merge condition is an equals relationship.
>>>
>>> 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.
>
> I'm currently trying to persuade my boss to give me time to do some work to
> implement this in Postgres. It's not something I will be able to start right
> away, but maybe in a little while.
>
> I'm currently seeing this as being able to mark overlap constraints ("&&" in
> quite a few data types) as "OVERLAP_MERGES", and have the planner be able to
> use the new merge join algorithm. So it wouldn't help with the exact query
> above, but would if I rewrote it to use the bioseg or spacial data types'
> overlap operators.
>
> I will need a little help as I am not incredibly familiar with the Postgres
> innards. Would someone be able to do that?

I can help review if you post a patch, even if it's WIP.  But you
should post it to -hackers, not here.

...Robert



view thread (32+ messages)  latest in thread

Message-ID: <603c8f070904060736s1a4e7868r5a1b6a5bbe8a2f26@mail.gmail.com>
Permalink:  ../603c8f070904060736s1a4e7868r5a1b6a5bbe8a2f26@mail.gmail.com/
Also on:    postgresql.org/message-id/603c8f070904060736s1a4e7868r5a1b6a5bbe8a2f26@mail.gmail.com

 · 

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: robertmhaas@gmail.com, matthew@flymine.org
  Subject: Re: plpgsql arrays
  In-Reply-To: <603c8f070904060736s1a4e7868r5a1b6a5bbe8a2f26@mail.gmail.com>

* 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