From: | Kenneth Marshall <ktm(at)rice(dot)edu> |
---|---|
To: | Nickolay <nitro(at)zhukcity(dot)ru> |
Cc: | Grzegorz Ja??kiewicz <gryzman(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: PG optimization question |
Date: | 2010-01-09 12:46:46 |
Message-ID: | 20100109124646.GA8123@it.is.rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Grzegorz Jaśkiewicz | 2010-01-09 12:51:41 | Re: Joint index including MAX() ? |
Previous Message | Richard Neill | 2010-01-09 12:46:07 | Joint index including MAX() ? |