pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron Johnson <ron.l.johnson@cox.net>
To: PostgreSQL performance <pgsql-performance@postgresql.org>
Subject: Re: How number of columns affects performance
Date: 01 Aug 2003 12:32:13 -0500
Message-ID: <1059759132.22384.5.camel@haggis> (raw)
In-Reply-To: <20030801130507.M93127@zoraida.natserv.net>
References: <20030801115257.I92555@zoraida.natserv.net>
	<1059755687.7508.638.camel@haggis>
	<20030801130507.M93127@zoraida.natserv.net>

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                                                      |
+-----------------------------------------------------------------+





view thread (9+ messages)  latest in thread

Message-ID: <1059759132.22384.5.camel@haggis>
Permalink:  ../1059759132.22384.5.camel@haggis/
Also on:    postgresql.org/message-id/1059759132.22384.5.camel@haggis

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: ron.l.johnson@cox.net
  Subject: Re: How number of columns affects performance
  In-Reply-To: <1059759132.22384.5.camel@haggis>
  References: <20030801115257.I92555@zoraida.natserv.net> <1059755687.7508.638.camel@haggis> <20030801130507.M93127@zoraida.natserv.net> <1059759132.22384.5.camel@haggis>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox