overlaps performance - Mailing list pgsql-hackers

From Grzegorz Jaśkiewicz
Subject overlaps performance
Date
Msg-id 48846E42.4050404@pointblue.com.pl
Whole thread Raw
Responses Re: overlaps performance  (Gregory Stark <stark@enterprisedb.com>)
List 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.


pgsql-hackers by date:

Previous
From: Markus Wanner
Date:
Subject: Re: [COMMITTERS] pgsql: Adjust things so that the query_string of a cached plan and the
Next
From: Gregory Stark
Date:
Subject: Re: overlaps performance