X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id B472FD1C50C for ; Fri, 1 Aug 2003 17:13:21 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 58327-01 for ; Fri, 1 Aug 2003 14:12:13 -0300 (ADT) Received: from mail1.acecape.com (mail1.acecape.com [66.114.74.12]) by svr1.postgresql.org (Postfix) with ESMTP id 7377AD1C4E6 for ; Fri, 1 Aug 2003 14:13:19 -0300 (ADT) Received: from p65-147.acedsl.com (p65-147.acedsl.com [66.114.65.147]) by mail1.acecape.com (8.12.9/8.12.9) with ESMTP id h71HDJ0H015806; Fri, 1 Aug 2003 13:13:19 -0400 Date: Fri, 1 Aug 2003 13:14:53 -0400 (EDT) From: Francisco J Reyes To: Ron Johnson Cc: PostgreSQL performance Subject: Re: How number of columns affects performance In-Reply-To: <1059755687.7508.638.camel@haggis> Message-ID: <20030801130507.M93127@zoraida.natserv.net> References: <20030801115257.I92555@zoraida.natserv.net> <1059755687.7508.638.camel@haggis> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/9 X-Sequence-Number: 2826 On Fri, 1 Aug 2003, Ron Johnson wrote: > Do all 100 fields *really* all refer to the same *one* entity, > with no repeating values, etc? Yes all fields belong to the same entity. I used 100 as an example it may be something like 60 to 80 fields (there are two tables in question). I don't formally do 3rd normal form, but for the most part I do most of the general concepts of normalization. > If not, then good design says to split the table. The original data was in Foxpro tables and I have made better normalized tables in PostgreSQL. > Also, if it's a high-activity table, but you only rarely need fields > 60-90, then splitting them out to their own table might be useful > (especially if some of those fields are large *CHAR or TEXT). Yes some of the fields are varchars. 5 fields are varchar(22) and 3 longer (35, 58, 70). The total row length is a little over 400 characters in Foxpro. In postgreSQL may be less than 300 (ie Foxpro uses ASCII representation for numbers so to store "1234567" it uses 7 bytes, whereas in PostgreSQL I can just make it an int and use 4 bytes)