X-Original-To: pgsql-performance@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 6592C925CB5 for ; Fri, 30 May 2003 14:18:56 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 69547-02 for ; Fri, 30 May 2003 14:18:55 -0400 (EDT) Received: from mail.libertyrms.com (unknown [209.167.124.227]) by developer.postgresql.org (Postfix) with ESMTP id 73339925CAA for ; Fri, 30 May 2003 14:18:55 -0400 (EDT) Received: from [10.1.2.130] (helo=dba2) by mail.libertyrms.com with esmtp (Exim 3.22 #3 (Debian)) id 19LoSt-0003UC-00 for ; Fri, 30 May 2003 14:18:55 -0400 Received: by dba2 (Postfix, from userid 1019) id ABEF4D1BB; Fri, 30 May 2003 14:18:54 -0400 (EDT) Date: Fri, 30 May 2003 14:18:54 -0400 From: Andrew Sullivan To: pgsql-performance@postgresql.org Subject: Re: Table Relationships Message-ID: <20030530181854.GA19077@libertyrms.info> Mail-Followup-To: Andrew Sullivan , pgsql-performance@postgresql.org References: <200305301003.19829.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/287 X-Sequence-Number: 2066 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. A -- ---- Andrew Sullivan 204-4141 Yonge Street Liberty RMS Toronto, Ontario Canada M2P 2A8 +1 416 646 3304 x110