Skip site navigation (1) Skip section navigation (2)

Re: Table Relationships

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Table Relationships
Date: 2003-05-30 18:18:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Fri, May 30, 2003 at 11:20:33AM -0600, scott.marlowe wrote:

> but denormalizing for storage is usually a bad idea, as it allows your 
> data to get filled with inconsistencies.

Sure, but if performance is an important goal for certain kinds of
SELECTs, using a trigger at insert or update to do denormalising is
perhaps an acceptable approach.  It's obvious that in most cases,
denormalising instead of optimising your normalisation is silly.  But
if you need something to return in, say, 2ms most of the time, and it
requires a wide variety of data, denormalising is a good idea.

It is, of course, contrary to the RDBMS-y mind to denormalise.  But
there are (rare) times when it's a good idea, and I hate to see it
rejected out of hand in such cases.

Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info>                              M2P 2A8
                                         +1 416 646 3304 x110

In response to


pgsql-performance by date

Next:From: Will LaShellDate: 2003-05-30 19:14:57
Subject: Re: Hardware advice
Previous:From: Roman FailDate: 2003-05-30 17:59:51
Subject: Re: Hardware advice

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group