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 D4A03D1C510 for ; Fri, 1 Aug 2003 17:32:14 +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 56361-08 for ; Fri, 1 Aug 2003 14:31:06 -0300 (ADT) Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243]) by svr1.postgresql.org (Postfix) with ESMTP id EA5CDD1C4E6 for ; Fri, 1 Aug 2003 14:32:12 -0300 (ADT) Received: from [192.168.1.1] ([68.11.66.83]) by lakemtao02.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20030801173213.EBHJ24359.lakemtao02.cox.net@[192.168.1.1]> for ; Fri, 1 Aug 2003 13:32:13 -0400 Subject: Re: How number of columns affects performance From: Ron Johnson To: PostgreSQL performance In-Reply-To: <20030801130507.M93127@zoraida.natserv.net> References: <20030801115257.I92555@zoraida.natserv.net> <1059755687.7508.638.camel@haggis> <20030801130507.M93127@zoraida.natserv.net> Content-Type: text/plain Message-Id: <1059759132.22384.5.camel@haggis> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 01 Aug 2003 12:32:13 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/10 X-Sequence-Number: 2827 On Fri, 2003-08-01 at 12:14, Francisco J Reyes wrote: > 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. Woo hoo!! > 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) But I'd only split if these big field are rarely used. Note that VARCHAR(xx) removes trailing spaces, so that also is a factor. -- +-----------------------------------------------------------------+ | Ron Johnson, Jr. Home: ron.l.johnson@cox.net | | Jefferson, LA USA | | | | "I'm not a vegetarian because I love animals, I'm a vegetarian | | because I hate vegetables!" | | unknown | +-----------------------------------------------------------------+