overlaps performance

From: Grzegorz Jaśkiewicz <gj(at)pointblue(dot)com(dot)pl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: overlaps performance
Date: 2008-07-21 11:08:50
Message-ID: 48846E42.4050404@pointblue.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hey guys,

I am asking here, because I know there is bunch of people here that know
the topic very well.
I need to use few 'overlaps' for timedate in my query. And I guess it is
quite inefficient there. So my question would be, why isn't postgresql
using indexes for OVERLAPS, and why optimizer doesn't substitute it with
something like:

(c <= a AND d > a) OR ( c >= a AND c < b)

instead of

(a,b) overlaps (c,d)

any corner cases, or particular reasons ?

(source of example)
http://www.depesz.com/index.php/2007/11/21/find-overlapping-time-ranges/

thanks.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2008-07-21 11:33:03 Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the
Previous Message Heikki Linnakangas 2008-07-21 08:53:08 Default of max_stack_depth and getrlimit