Re: PG optimization question - Mailing list pgsql-performance

From Kenneth Marshall
Subject Re: PG optimization question
Date
Msg-id 20100109124646.GA8123@it.is.rice.edu
Whole thread Raw
In response to Re: PG optimization question  (Nickolay <nitro@zhukcity.ru>)
Responses Re: PG optimization question
List pgsql-performance
On Sat, Jan 09, 2010 at 03:42:08PM +0300, Nickolay wrote:
> I do not see any way to normalize this table anymore. it's size is 4Gig for
> ~4M rows, i.e. 1Kb per row, i think it's ok.
> Also there are 2 indexes: by date_time and by a couple of service fields
> (total index size is 250Mb now).
> I think i'll be going to partition by months (approx. 1M rows or 1Gig per
> month), so it would be like 60 partitions for 5 years. Is that OK for
> postgres?

Not a problem. We have a log server that has 64 daily partitions.

> Oh, btw, 95% of queries are searching rows for current date (last 24
> hours).

You may want to use a daily staging table and then flush to the
monthly archive tables at the end of the day.

Ken

pgsql-performance by date:

Previous
From: Richard Neill
Date:
Subject: Joint index including MAX() ?
Next
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Joint index including MAX() ?