Re: date - range

Поиск
Список
Период
Сортировка
От Mischa
Тема Re: date - range
Дата
Msg-id 1112423119.424e3acf49c9f@webmail.telus.net
обсуждение исходный текст
Ответ на Re: date - range  (Mischa <mischa.Sandberg@telus.net>)
Список pgsql-performance
Quoting Mischa <mischa.Sandberg@telus.net>:

[deleted]
> SELECT  People.* FROM People
> JOIN Widths
> ON    People.start = today - today % Widths.width
> AND   People.width = Widths.width

Yikes! I hit the SEND button one ohnosecend too fast.

(1) You still ALSO have to test:
... AND today between first_date and last_date

(2) On some SQL engines, it makes a different to how the engine can re-order the
nested loops, if you make the index (width,start) instead of (start,width).
Haven't tried on PG8 yet.
--
"Dreams come true, not free."


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

Предыдущее
От: Mischa
Дата:
Сообщение: Re: date - range
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: date - range