Re: R: how to add array of objects to a record - Mailing list pgsql-general

From David Fetter
Subject Re: R: how to add array of objects to a record
Date
Msg-id 20080203220856.GN4153@fetter.org
Whole thread Raw
In response to R: how to add array of objects to a record  ("dfx" <dfx@dfx.it>)
List 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@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

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

pgsql-general by date:

Previous
From: Shane Ambler
Date:
Subject: Re: [OT] "advanced" database design (long)
Next
From: brian
Date:
Subject: Re: Function returning subset of columns from table (return type)