X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8E48BD1BAF8 for ; Mon, 12 Apr 2004 09:13:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 61632-05 for ; Mon, 12 Apr 2004 09:14:00 -0300 (ADT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id A9395D1BAA5 for ; Mon, 12 Apr 2004 09:13:56 -0300 (ADT) Received: (qmail 20507 invoked by uid 500); 12 Apr 2004 12:17:40 -0000 Date: Mon, 12 Apr 2004 07:17:40 -0500 From: Bruno Wolff III To: Rajesh Kumar Mallah Cc: pgsql-performance@postgresql.org Subject: Re: Effect of too many columns Message-ID: <20040412121740.GC20278@wolff.to> Mail-Followup-To: Rajesh Kumar Mallah , pgsql-performance@postgresql.org References: <407A8369.9090205@trade-india.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <407A8369.9090205@trade-india.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/128 X-Sequence-Number: 6428 On Mon, Apr 12, 2004 at 17:24:17 +0530, Rajesh Kumar Mallah wrote: > > Greetings, > > Is there any performance penalty of having too many columns in > a table in terms of read and write speeds. > > To order to keep operational queries simple (avoid joins) we plan to > add columns in the main customer dimension table. > > Adding more columns also means increase in concurrency in the table > as more and more applications will access the same table. > > Any ideas if its better to split the table application wise or is it ok? This is normally a bad idea. If you properly implement constraints in what is effectively a materialized view, you might end up with a slower system, depending on your mix of queries. (Generally updating will take more resources.) So you probably want to test your new design under a simulated normal load to see if it actually speeds things up in your case before making the change.