Re: Arrays instead of join tables

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: William Garrison <postgres(at)mobydisk(dot)com>
Subject: Re: Arrays instead of join tables
Date: 2007-04-01 10:44:26
Message-ID: 460F8D0A.2060302@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

William Garrison wrote:
> I've never worked with a database with arrays, so I'm curious...
>
> + Efficiency: To return the set_ids for an Item, I could return an array
> back to my C# code instead of a bunch of rows with integers. That's
> probably faster, right?

You should look in to the contrib modules intagg and intarray.

In particular contrib/intagg/README.int_aggregate discusses an example
quite similar to what you're proposing.

Short summary: Seems like a win for very static data, a loss for very dynamic data.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message jlowery 2007-04-01 16:09:30 plpy prepare problem
Previous Message Tom Lane 2007-04-01 07:02:26 Re: Default value of column not respecting character length or domain restraints.