Re: Scaleable DB structure for counters... - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Scaleable DB structure for counters...
Date
Msg-id 9e4684ce0607160223t713f63cbuf0f67b0b113712cf@mail.gmail.com
Whole thread Raw
In response to Scaleable DB structure for counters...  (Eci Souji <eci.souji@gmail.com>)
List pgsql-general
On 7/16/06, Eci Souji <eci.souji@gmail.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

pgsql-general by date:

Previous
From: "Harald Armin Massa"
Date:
Subject: Re: Scaleable DB structure for counters...
Next
From: qnick@spec.net.pl
Date:
Subject: Browse database , schema