Re: Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?
Дата
Msg-id 200905211250.57328.peter_e@gmx.net
обсуждение исходный текст
Ответ на Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?  (Dmitry Koterov <dmitry@koterov.ru>)
Список pgsql-hackers
On Thursday 21 May 2009 11:06:29 Dmitry Koterov wrote:
> 1. Store the DEFAULT flag directly in NULL BITMAP (add a bit to NULL bitmap
> not only for NULLable fields, but also for NOT NULL DEFAULT ... fields).
> 2. Add another bitmap for each tuple (DEFAULT bitmap). Bit value 0 means
> that there is a real value in a cell, 1 - that the value is default.
> 3. The same as (1), but always force default value to be 0 (or false or any
> other values with meaning "zero") and optimize only these cases.

It seems to me that these solutions would require everyone in the world to pay 
the overhead of a few to many bits in every tuple to optimize what appears to 
be a relatively rare circumstance after all.  Doesn't seem worth it to me.


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

Предыдущее
От: Dmitry Koterov
Дата:
Сообщение: Fast ALTER TABLE ... ADD COLUMN ... DEFAULT xxx?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Compiler warning