how small to split a table?

From: Vivek Khera <vivek(at)khera(dot)org>
To: "Pgsql-Performance ((((E-mail))))" <pgsql-performance(at)postgresql(dot)org>
Subject: how small to split a table?
Date: 2007-03-20 15:02:32
Message-ID: 757C142A-64CB-428B-9861-D956B3C9953E@khera.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I've got one logging table that is over 330 million rows to store 6
months' worth of data. It consists of two integers and a 4-character
long string. I have one primary key which is the two integers, and
an additional index on the second integer.

I'm planning to use inheritance to split the table into a bunch of
smaller ones by using a modulo function on one of the integers on
which we scan often.

My question is how small to make each inherited piece? If I do
modulo 10, then each sub-table will be between 32 and 34 million rows
today based on current distribution.

If I expect to increase traffic 2 times over the next year (thus
doubling my logs) what would you recommend?

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Heiko W.Rupp 2007-03-20 15:20:42 Re: how small to split a table?
Previous Message Magnus Hagander 2007-03-20 14:34:48 Re: SATA RAID: Promise vs. 3ware