Re: Need help to organize database

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Vladimir S(dot) Petukhov" <vladimir(at)sycore(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Need help to organize database
Date: 2004-12-22 03:25:59
Message-ID: 20041222032559.GA24372@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 22, 2004 at 01:24:57 +0000,
"Vladimir S. Petukhov" <vladimir(at)sycore(dot)org> wrote:
> Yes, of course, this is example only.
> But relation between tables is not important now...

It is important for design. You should use a normallized design initially
and consider denormalized designs if you have peformance problems.

> I whant to ask - is it a good idea to store 1 time's data (value1-4) per row
> in 24*31 rows? May be it is better and quicker to store, for example, 2
> time's data per row (value1-4, day 1, value1-4, day 2) or other structure?

The normalized design is one set of values (for a particular day and time)
per row. This will make querying the data easier.

As far as what optimizations might be a good idea when you have problems,
we can't tell you, because you haven't told us what typical queries look
like. It still may be that postgres is overkill for your purposes and
something more lightweight like Berkeley DB might be better for you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-12-22 03:27:47 Re: Need help to organize database
Previous Message Vladimir S. Petukhov 2004-12-22 03:15:07 Re: Need help to organize database