Re: Need help to organize database - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Need help to organize database
Date
Msg-id 20041222032559.GA24372@wolff.to
Whole thread Raw
In response to Re: Need help to organize database  ("Vladimir S. Petukhov" <vladimir@sycore.org>)
List pgsql-general
On Wed, Dec 22, 2004 at 01:24:57 +0000,
  "Vladimir S. Petukhov" <vladimir@sycore.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.

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: 8.0 Beta3 worked, RC1 didn't!
Next
From: Bruno Wolff III
Date:
Subject: Re: Need help to organize database