Re: Monthly table partitioning for fast purges?

From: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
To: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Monthly table partitioning for fast purges?
Date: 2003-08-04 19:41:28
Message-ID: 1060026088.1987.84.camel@haggis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2003-08-04 at 09:02, Benjamin Jury wrote:
> You could create an index on the function date(), which strips the time
> information.

How much of a hit would there be if he had separate "monthly tables"
and UNIONed them?

> > -----Original Message-----
> > From: psql-mail(at)freeuk(dot)com [mailto:psql-mail(at)freeuk(dot)com]
> > Sent: 04 August 2003 14:01
> > To: PgSQL General ML
> > Subject: Re: [GENERAL] Monthly table partitioning for fast purges?
> >
> >
> > I am looking at ways to speed up queries, the most common way by for
> > queries to be constrianed is by date range. I have indexed the date
> > column. Queries are still slower than i would like.
>
> ...
>
> > The date column is of type timestamp (and so goes right down
> > to seconds)
> > , most user queries are only concerned about whole days without the
> > times, (but hte time data is required for other queries) can i do
> > something with an index of the timestamps cast to dates? and
> > then cast
> > the queries to dates too?

--
+-----------------------------------------------------------------+
| Ron Johnson, Jr. Home: ron(dot)l(dot)johnson(at)cox(dot)net |
| Jefferson, LA USA |
| |
| "I'm not a vegetarian because I love animals, I'm a vegetarian |
| because I hate vegetables!" |
| unknown |
+-----------------------------------------------------------------+

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2003-08-04 19:43:00 Re: plPHP -- sort of an announcement.. but not commercial
Previous Message Sean Chittenden 2003-08-04 19:40:46 Re: plPHP -- sort of an announcement.. but not commercial