From: | Joerg Hessdoerfer <Joerg(dot)Hessdoerfer(at)sea-gmbh(dot)com> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Table design question... |
Date: | 2002-08-06 15:24:53 |
Message-ID: | 200208061528.RAA21080@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)hessdoerfer(at)sea-gmbh(dot)com
WWW: http://www.sea-gmbh.com
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2002-08-06 15:28:20 | Re: Transitive Closure |
Previous Message | Charles Hauser | 2002-08-06 15:14:49 | problem fetching currval of sequence |