Re: Most efficient way of selecting by date?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Most efficient way of selecting by date?
Дата
Msg-id 20030909210152.GA16181@wolff.to
обсуждение исходный текст
Ответ на Most efficient way of selecting by date?  (Simon Willison <cs1spw@bath.ac.uk>)
Список pgsql-novice
On Tue, Sep 09, 2003 at 21:30:31 +0100,
  Simon Willison <cs1spw@bath.ac.uk> wrote:
>
> I have a table which includes a field for the date and time an item was
> added to it. What's the most efficient way of selecting all of the items
> added on a specific date (this is a really basic question but I'm new to
> Postgres)? Also, would it be worth putting an index on the date column
> as most of my selects will be using it?

Probably by using a range. Something like:
select whatever from wherever
  where added < '2003-01-03' and added >= '2003-01-02';

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

Предыдущее
От: Oliver Fromme
Дата:
Сообщение: Re: Modifying pg_shadow?
Следующее
От: Juan Francisco Diaz
Дата:
Сообщение: How to opimize the insertion of data