Re: Scaleable DB structure for counters...

From: "hubert depesz lubaczewski" <depesz(at)gmail(dot)com>
To: "Eci Souji" <eci(dot)souji(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Scaleable DB structure for counters...
Date: 2006-07-16 09:23:03
Message-ID: 9e4684ce0607160223t713f63cbuf0f67b0b113712cf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/16/06, Eci Souji <eci(dot)souji(at)gmail(dot)com> wrote:
>
> So we've got a table called "books" and we want to build records of how
> often each book is accessed and when. How would you store such
> information so that it wouldn't become a huge unmanageable table?
> Before I go out trying to plan something like this I figured I'd ask and
> see if anyone had any experience with such a beast.
>

from your other email i understand that you will deal with a milion or so
records in access-list table.
the simplest approach would be not to divide it into multiple tables, but
instead just add triger on access table to increment counters perbook.
simple and very effective.

depesz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Christian Kratzer 2006-07-16 11:38:56 Re: Scaleable DB structure for counters...
Previous Message Harald Armin Massa 2006-07-16 09:07:40 Re: Scaleable DB structure for counters...