Re: Most efficient way of selecting by date? - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: Most efficient way of selecting by date?
Date
Msg-id 20030909210152.GA16181@wolff.to
Whole thread Raw
In response to Most efficient way of selecting by date?  (Simon Willison <cs1spw@bath.ac.uk>)
List 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 by date:

Previous
From: Oliver Fromme
Date:
Subject: Re: Modifying pg_shadow?
Next
From: Juan Francisco Diaz
Date:
Subject: How to opimize the insertion of data