Re: SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps
Дата
Msg-id 22529.1238684442@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL to Check whether "AN HOUR PERIOD" is between start and end timestamps  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-sql
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Another way to phrase the WHERE clause is with the OVERLAPS operator,
> something like this:

> WHERE (start_ts, end_ts) OVERLAPS ('2008-12-07 07:59:59', '2008-12-07 08:59:59')

> What I'm not so sure about is how optimizable this construct is.

Not at all :-(  --- or at least, our code doesn't do anything with
it currrently; I shouldn't claim that it's impossible to optimize.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Tony Cebzanov
Дата:
Сообщение: Performance problem with row count trigger
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ibatis with overlaps query