pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bill Montgomery <billm@lulu.com>
To: pgsql-performance@postgresql.org
Subject: Re: Column order performance
Date: Tue, 10 Aug 2004 14:49:29 -0400
Message-ID: <411918B9.9000707@lulu.com> (raw)
In-Reply-To: <200408101023.28084.josh@agliodbs.com>
References: <4118D008.1070606@lulu.com>
	<200408101023.28084.josh@agliodbs.com>

Josh Berkus wrote:

>>Does the order of columns of varying size have any effect on
>>SELECT/INSERT/UPDATE/and/or/DELETE performance? Take the example where
>>an integer primary key is listed first in the table and alternatively
>>listed after some large varchar or text columns?
>>    
>>
>
>No, the "order" of the columns in the table makes no difference.  They are not 
>physically stored in the metadata order, anyway; on the data pages, 
>fixed-length fields (e.g. INT, BOOLEAN, etc.) are stored first and 
>variable-length fields (CHAR, TEXT, NUMERIC) after them, AFAIK.
>  
>

Is this true even after a table is altered to "append" say, an integer 
column, after there are already variable-length columns in the table?

-Bill



view thread (3+ messages)

Message-ID: <411918B9.9000707@lulu.com>
Permalink:  ../411918B9.9000707@lulu.com/
Also on:    postgresql.org/message-id/411918B9.9000707@lulu.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: billm@lulu.com
  Subject: Re: Column order performance
  In-Reply-To: <411918B9.9000707@lulu.com>

* 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