Re: How many fields in a table are too many - Mailing list pgsql-general

From Bruce Momjian
Subject Re: How many fields in a table are too many
Date
Msg-id 200306281806.h5SI67I08307@candle.pha.pa.us
Whole thread Raw
In response to Re: How many fields in a table are too many  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Responses Re: How many fields in a table are too many  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Alvaro Herrera wrote:
> On Sat, Jun 28, 2003 at 01:43:32PM -0400, Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.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 don't think we would change any physical ordering with ALTER TABLE ---
just do it when the table is created, if possible.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: How many fields in a table are too many
Next
From: Tom Lane
Date:
Subject: Re: How many fields in a table are too many