Re: Table design question...

Поиск
Список
Период
Сортировка
От Joerg Hessdoerfer
Тема Re: Table design question...
Дата
Msg-id 200208061528.RAA21080@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Table design question...  (Richard Huxton <dev@archonet.com>)
Список 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 по дате отправления:

Предыдущее
От: Charles Hauser
Дата:
Сообщение: problem fetching currval of sequence
Следующее
От: "Josh Berkus"
Дата:
Сообщение: Re: problem fetching currval of sequence