Re: Join a varchar array

From: Richard Huxton <dev(at)archonet(dot)com>
To: Robin Ericsson <robin(dot)ericsson(at)profecta(dot)se>
Cc: Postgres general mailing list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Join a varchar array
Date: 2004-06-17 10:34:56
Message-ID: 40D173D0.8070909@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robin Ericsson wrote:
> On Thu, 2004-06-17 at 11:38, Richard Huxton wrote:
>>
>>You appear to be using the array as a replacement for a table. Don't do
>>that. From the little information you've provided, it looks like you
>>want a separate table (a_ref, b_ref, float_val) where a_ref references
>>the current table, b_ref the other table.
>
>
> Thats correct, I choose this way because there will be a lot of entries
> and it will grow pretty quickly, but maybe postgres will be able to
> handle this?

If it can't handle the data in tables, why should it handle it in
arrays? You're using a relational database, stick to relations.

> If I went for a separate table it will contain over 3 milj. entries
> within in a couple of weeks and still grow after that but not at the
> same speed as the first weeks.

There are people here with hundreds of millions of rows in some tables.
Keep your design simple and clean, apply indexes once you have some idea
of what activity your system will see and subscribe to the performance list.

PG has some odd corner-cases where performance could be better, but on
the whole it does an excellent job of coping with large numbers of users
and large amounts of data.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adam Witney 2004-06-17 11:10:30 Re: Visual Explain
Previous Message Tom Allison 2004-06-17 10:24:42 [Fwd: Postfix SMTP server: errors from avalanche.netmar.com[198.69.224.177]]