Re: R: how to add array of objects to a record

From: David Fetter <david(at)fetter(dot)org>
To: dfx <dfx(at)dfx(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: R: how to add array of objects to a record
Date: 2008-02-03 22:08:56
Message-ID: 20080203220856.GN4153@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Feb 03, 2008 at 10:00:04PM +0100, dfx wrote:
> Yes, this is the "normal" way, but I was tempted to investigate the
> possibility to use array (of string) or composite types to avoid to
> increase the number of tables

That is an extremely bad thing to "optimize" for. Add tables as
needed for your data.

> and to simplify stored procedures reducing the number of join.

That's a bad thing to "optimize" for, too. Just do your JOINs, and
*if* you discover a performance problem, come back here and get help
on it.

> Thi idea was born following the discussion concerning EAV.

EAV is just a mistake.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Browse pgsql-general by date

  From Date Subject
Next Message brian 2008-02-03 23:23:47 Re: Function returning subset of columns from table (return type)
Previous Message Shane Ambler 2008-02-03 21:05:11 Re: [OT] "advanced" database design (long)