Re: Help normalizing table(s)

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Help normalizing table(s)
Date: 2002-10-17 17:30:40
Message-ID: 20021017173040.GC5237@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 17, 2002 at 09:24:59PM +0530, Shridhar Daithankar wrote:
> On 17 Oct 2002 at 11:12, Kevin Old wrote:
>
> > My solution to this is to store the data in tables by hour. This keeps
> > the tables relatively small (50-100K records) and helps with searching.

> In postgresql, you can inherit a table from another table. You can query on
> base table and gather rows from child table. So make an empty base table, make
> each hourly table child of base table and query on base table. It will take
> care of everything. Remove the hourly table after 48 hours..

What will happen when you want to look at the last 24 hours and not 48?
And if somebody want to look at the last 72 hours?

I think this is not a good idea. And I know this because I did the same
thing some time ago, and it was so huge a PITA that I eventually ended
merging all the tables into one.

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"When the proper man does nothing (wu-wei),
his thought is felt ten thousand miles." (Lao Tse)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-10-17 18:09:30 Re: Query performance with small data base
Previous Message Ian Harding 2002-10-17 17:23:40 Re: Boolean to Integer?