Re: Grouping by date range

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Jeffrey Melloy <jmelloy(at)visualdistortion(dot)org>
Cc: Alexander Litvinov <lan(at)ac-sw(dot)com>, Mat <psql-mail(at)freeuk(dot)com>, pgsql general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Grouping by date range
Date: 2003-08-19 18:18:31
Message-ID: 20030819181831.GB4939@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 19, 2003 at 12:07:57PM -0500, Jeffrey Melloy wrote:
> Alexander Litvinov wrote:
>
> >if you need to handle large number of rows try to add columns with year
> >and month, write triggers for filling this columns, make indexes and
> >things should be fast.
>
> Is this the only way to do it? I was running into this problem, too.
> It would be nice if the function indexes could handle things like
> 'date_part('month', <columname>)

That's why they can in the upcoming 7.4... In the meantime I think you
can create an index using a function that has the constants inline, i.e.
a function date_part_month(), etc.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Es filosofo el que disfruta con los enigmas" (G. Coli)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 2003-08-19 18:35:08 Re: move to usenet?
Previous Message Guillaume LELARGE 2003-08-19 17:53:17 Re: Mailing list in French