X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A14F33A499F for ; Thu, 6 Jan 2005 17:39:22 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26057-06 for ; Thu, 6 Jan 2005 17:39:04 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id C3A423A41E1 for ; Thu, 6 Jan 2005 17:38:59 +0000 (GMT) Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6873502; Thu, 06 Jan 2005 09:40:37 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: Denormalization WAS: Low Performance for big hospital server .. Date: Thu, 6 Jan 2005 09:38:45 -0800 User-Agent: KMail/1.6.2 Cc: Frank Wiles References: <1104831107.41da6283add0c@webmail.moph.go.th> <200501060906.55832.josh@agliodbs.com> <20050106111207.52e39d04.frank@wiles.org> In-Reply-To: <20050106111207.52e39d04.frank@wiles.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200501060938.45688.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/71 X-Sequence-Number: 9761 Frank, > Now that's rich. I don't think I've ever seen a database perform > worse after it was normalized. In fact, I can't even think of a > situation where it could! Oh, there are some. For example, Primer's issues around his dating database; it turned out that a fully normalized design resulted in very bad select performance because of the number of joins involved. Of course, the method that did perform well was *not* a simple denormalization, either. The issue with denormalization is, I think, that a lot of developers cut their teeth on the likes of MS Access, Sybase 2 or Informix 1.0, where a poor-performing join often didn't complete at all. As a result, they got into the habit of "preemptive tuning"; that is, doing things "for performance reasons" when the system was still in the design phase, before they even know what the performance issues *were*. Not that this was a good practice even then, but the average software project allocates grossly inadequate time for testing, so you can see how it became a bad habit. And most younger DBAs learn their skills on the job from the older DBAs, so the misinformation gets passed down. -- Josh Berkus Aglio Database Solutions San Francisco