Re: Table design question... - Mailing list pgsql-sql

From Joerg Hessdoerfer
Subject Re: Table design question...
Date
Msg-id 200208061528.RAA21080@localhost.localdomain
Whole thread Raw
In response to Re: Table design question...  (Richard Huxton <dev@archonet.com>)
List pgsql-sql
Hi again,

On Tuesday 06 August 2002 14:59, you wrote:
[...]
> If your exports are all of one type (i.e. all arrays or all integer or all
> float) I'd go for (B) since that makes things nice and easy. On the other
> hand, if you want to export different types in one query you'll need to do
> a union unless you put all possible fields in one table:
>
> CREATE TABLE data_all (
>   scet        timestamp,
>   recv    timestamp,
>   data_type    char(1) CHECK (data_type IN ('i','f','a')),
>   intval    int4,
>   floatval    float,
>   arr_names    int4[],
>   arr_values    int4[]
> );
>
> If you go the route of (A) or (B) I'd run a few tests to see which is more
> efficient. You can always hide the implementation details behind a view and
> some functions.
>
> - Richard Huxton
>
[...]

Yes, I'm currently going the testing route - my initial idea was also 
something like your table def above, but this rules itself out (I really 
think 500,000,000 rows is a bit too much ;-). Don't get me wrong, I think a 
'big iron' could manage that easily, but I need to make do with a quite 
common PeeCee (running Linux, that is)...

Thanks again for your input,Joerg
-- 
Leading SW developer  - S.E.A GmbH
Mail: joerg.hessdoerfer@sea-gmbh.com
WWW:  http://www.sea-gmbh.com


pgsql-sql by date:

Previous
From: Charles Hauser
Date:
Subject: problem fetching currval of sequence
Next
From: "Josh Berkus"
Date:
Subject: Re: problem fetching currval of sequence