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';