Re: Create index on the year of a date column - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Create index on the year of a date column
Date
Msg-id 20030606122916.GC30097@wolff.to
Whole thread Raw
In response to Create index on the year of a date column  ("Nick Barr" <nick.barr@webbased.co.uk>)
List pgsql-general
On Thu, Jun 05, 2003 at 17:38:21 +0100,
  Nick Barr <nick.barr@webbased.co.uk> wrote:
> Hi,
>
> I am trying to create an index on the year of a date field, to speed up
> some queries. Table structure is as follows

Wouldn't an index on the plain date work as well? You would have to
make queries for years be range queries instead of equal, but the index
could be used for other things (like ordering by date).

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: [HACKERS] SAP and MySQL ... [and Benchmark]
Next
From: Bruno Wolff III
Date:
Subject: Re: EXTERN JOIN with WHEN query