Re: Column storage positions

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Column storage positions
Дата
Msg-id 20070221135407.GL25424@alvh.no-ip.org
обсуждение исходный текст
Ответ на Column storage positions  ("Phil Currier" <pcurrier@gmail.com>)
Ответы Re: Column storage positions  ("Phil Currier" <pcurrier@gmail.com>)
Список pgsql-hackers
Phil Currier escribió:
> Inspired by this thread [1], and in particular by the idea of storing
> three numbers (permanent ID, on-disk storage position, display
> position) for each column, I spent a little time messing around with a
> prototype implementation of column storage positions to see what kind
> of difference it would make.  The results were encouraging: on a table
> with 20 columns of alternating smallint and varchar(10) datatypes,
> selecting the max() of one of the rightmost int columns across 1
> million rows ran around 3 times faster.

[snipped]

I'd expect the system being able to reoder the columns to the most
efficient order possible (performance-wise and padding-saving-wise),
automatically.  When you create a table, sort the columns to the most
efficient order; ALTER TABLE ADD COLUMN just puts the new columns at the
end of the tuple; and anything that requires a rewrite of the table
(ALTER TABLE ... ALTER TYPE for example; would be cool to have CLUSTER
do it as well; and do it on TRUNCATE also) again recomputes the most
efficient order.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: tsearch in core patch, for inclusion
Следующее
От: "Florian G. Pflug"
Дата:
Сообщение: Re: New feature request: FlashBack Query