Re: explosion of tiny tables representing multiple - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: explosion of tiny tables representing multiple
Date
Msg-id 20061105100324.GA3979@svana.org
Whole thread Raw
In response to Re: explosion of tiny tables representing multiple  (Benjamin Weaver <benjamin.weaver@classics.oxford.ac.uk>)
List pgsql-general
On Fri, Nov 03, 2006 at 08:25:25PM +0000, Benjamin Weaver wrote:
> Dear Martijn,
>
> Wow, didn't know about arrays.  Did lots of sql, but, as I think about it,
> that was 7 years ago, and we didn't know about arrays then
>
> Are their performance problems with arrays?  We will not likely be working
> with more than 50,000 - 100,000 records.

If by records you mean rows in the database, then 50,000 rows is a baby
database, nothing to worry about there.

Performence of arrays scale about linear with the number of elements in
the array. So if most of your arrays have only 2 or 3 elements, the
performence should be good. If you make a single array with 50,000
element, it's going to suck very badly.

Note, recent versions of postgres have better support for arrays,
including for indexing thereof. Especially the new GIN index type may
be useful for you.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Mark Morgan Lloyd
Date:
Subject: Converting a timestamp to a time
Next
From: Russell Smith
Date:
Subject: Re: ERROR: tuple concurrently updated