From: | "Phil Currier" <pcurrier(at)gmail(dot)com> |
---|---|
To: | "Martijn van Oosterhout" <kleptog(at)svana(dot)org> |
Cc: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Column storage positions |
Date: | 2007-02-21 17:06:30 |
Message-ID: | c58979e50702210906m71020d83hffa2af7db08a4b17@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2/21/07, Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
> On Wed, Feb 21, 2007 at 03:59:12PM +0100, Florian G. Pflug wrote:
> > I think you'd want to have a flag per field that tell you if the user
> > has overridden the storage pos for that specific field. Otherwise,
> > the next time you have to chance to optimize the ordering, you might
> > throw away changes that the admin has done on purpose.
>
> Why would you want to let the admin have any say at all about the
> storage order?
Well, for two reasons:
1) If you have a table with one very-frequently-accessed varchar()
column and several not-frequently-accessed int columns, it might
actually make sense to put the varchar column first. The system won't
always be able to make the most intelligent decision about table
layout.
2) As I described in my original email, without this capability, I
don't see any good way to perform an upgrade between PG versions
without rewriting each table's data. Maybe most people aren't doing
upgrades like this right now, but it seems like it will only become
more common in the future. In my opinion, this is more important than
#1.
But I understand that it's a potential foot-gun, so I'm happy to drop
it. It would be nice though if there were some ideas about how to
address problem #2 at least.
phil
From | Date | Subject | |
---|---|---|---|
Next Message | Florian G. Pflug | 2007-02-21 17:17:30 | Re: Column storage positions |
Previous Message | Bruce Momjian | 2007-02-21 17:06:10 | Re: Enums patch v2 |