Re: How many fields in a table are too many

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, btober(at)seaworthysys(dot)com, scrawford(at)pinpointresearch(dot)com, kleptog(at)svana(dot)org, m_tessier(at)sympatico(dot)ca, pgsql-general(at)postgresql(dot)org
Subject: Re: How many fields in a table are too many
Date: 2003-06-28 18:27:42
Message-ID: 3EFDDE1E.60801@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera wrote:
> On Sat, Jun 28, 2003 at 01:43:32PM -0400, Tom Lane wrote:
>> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> > Is this a TODO?
>> > When columns can be reordered, move varlena columns to the end?
>>
>> I believe that really what you want is fixed-width NOT NULL columns
>> first, then fixed-width nullable, then var-width. This ordering will
>> improve the odds of actually being able to use the fixed offset for
>> a particular column.
>
> This means that when you do ALTER TABLE ... SET/DROP NOT NULL the table
> may have to be completely rewritten? Altering the physical order is
> sure to provoke a rewrite, but I think people will expect a change in
> constraints to be a fast operation.
>

I said "... table starts with ...", I said nothing about physically
reordering an existing table.

All we where talking about is uncoupling the order in which attributes
of a relation appear if automatically expanded from "SELECT * ...".
Currently, they are tied to the order of the physical tuple layout,
which in turn is the result of the original order at CREATE TABLE, plus
added columns at the end and dropped ones taken out.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-06-28 18:43:07 Re: How many fields in a table are too many
Previous Message Tom Lane 2003-06-28 18:21:57 Re: How many fields in a table are too many