Re: Indexes?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Indexes?
Дата
Msg-id 20041202194343.GA32549@wolff.to
обсуждение исходный текст
Ответ на Indexes?  (Bjørn T Johansen <btj@havleik.no>)
Список pgsql-general
On Thu, Dec 02, 2004 at 07:11:29 +0100,
  Bjørn T Johansen <btj@havleik.no> wrote:
> I have a table where I need to use "..where curdate between fromDate and
> toDate".
> Is it best to have two indexes, one for FromDate and one for toDate or just
> one index for both the fields?

Assuming that curdate is something like the date when the query is being
run and that FromDate and toDate are columns in the table you are
searching, then you probably want indexes on each column. A combined
index scan wouldn't be useful. An index scan on either FromDate or toDate
might be useful depending on the distribution of values in those columns
and the value of curdate.

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

Предыдущее
От: "Vincent Hikida"
Дата:
Сообщение: Re: Indexes?
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: List archives not being updated?