Re: PostgreSQL database design for a large company

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Kalai R <softlinne(dot)kv(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL database design for a large company
Date: 2011-02-26 01:24:36
Message-ID: 4D685654.8030505@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 24/02/2011 10:59 AM, Kalai R wrote:
> We are going to design database for a large company with multi branches.
> I am using PostgreSQL
>
> For example,
>
> I create a single database for all branches. After 10 years, database
> size is too large.

What is "too large?"

If you keep PostgreSQL up to date, have periodic hardware updates, and
properly maintain & index the database, it won't necessarily become
"too" large at all.

If it does, your best option is usually going to be partitioning tables
into live- and history- sections, or partitioning by some
query-appropriate key like date. It is a good idea to think about these
issues when designing the app and database, rather than trying to hack
them in afterwards. You can get particularly significant benefits at low
effort cost by consistently using partial indexes to keep index sizes
down for queries that only touch "live" data.

> I want to know ,at that time, the performance of the database is reduced
> or not.

If you add more data, then all other things being equal the database
will get slower. How much? Hard to know, it depends so much on your
query patterns, your maintenance, etc. In any case, you would be crazy
to keep on running on 10 year old hardware with a 10 year old release of
PostgreSQL. In reality you must plan periodic updates, in which case
it's quite likely that the growth of hardware and software performance
will keep up with the data growth.

> Is it possible to maintain in a single database for all years of data?

How much data do you expect to have? How fast will it grow?

--
Craig Ringer

Tech-related writing at http://soapyfrogs.blogspot.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2011-02-26 01:31:46 Re: PostgreSQL database design for a large company
Previous Message Benjamin Smith 2011-02-25 23:50:31 Re: pg_dump makes our system unusable - any way to pg_dump in the middle of the day? (postgres 8.4.4)