pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kenneth Marshall <ktm@rice.edu>
To: Nickolay <nitro@zhukcity.ru>
Cc: Grzegorz Ja??kiewicz <gryzman@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: PG optimization question
Date: Sat, 9 Jan 2010 06:46:46 -0600
Message-ID: <20100109124646.GA8123@it.is.rice.edu> (raw)
In-Reply-To: <4B4879A0.2060703@zhukcity.ru>
References: <4B485975.70506@zhukcity.ru>
	<2f4958ff1001090418i78dee992t5ff2d78a54187c07@mail.gmail.com>
	<4B4879A0.2060703@zhukcity.ru>

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



view thread (14+ messages)  latest in thread

Message-ID: <20100109124646.GA8123@it.is.rice.edu>
Permalink:  ../20100109124646.GA8123@it.is.rice.edu/
Also on:    postgresql.org/message-id/20100109124646.GA8123@it.is.rice.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: ktm@rice.edu, nitro@zhukcity.ru, gryzman@gmail.com
  Subject: Re: PG optimization question
  In-Reply-To: <20100109124646.GA8123@it.is.rice.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox