Search Postgresql Archives

Re: Smaller data types use same disk space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 26, 2012 at 11:02 AM, Mike Christensen <mike@xxxxxxxxxxxxx> wrote:
> I don't really think you'd need to decouple the internal column order
> from what the user sees.  A REORDER COLUMNS command should re-build
> the table with the columns in the specified order.  Internally, it
> should be no different from making a new table, copying all the data
> over, then deleting the old table.  If there's any optimizations that
> can be done (such as making this faster on large tables), those could
> be done in future versions.  I'd just like to changing column order
> easier without remaking the table or renaming columns and changing
> their data types (as suggested by Marc)

That's a controversial point: doing it that way makes reordering of
large tables highly impractical.  A column map turns that into a
catalog update which can be done at any time.  I would argue that you
can have it both ways: implement the map and have table rebuilding
operations (like TRUNCATE and CLUSTER) opportunistically do the
physical swap.

merlin

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux