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.