Re: Free Space Map thoughts

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Free Space Map thoughts
Дата
Msg-id 47342718.5060701@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Free Space Map thoughts  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Free Space Map thoughts  (Simon Riggs <simon@2ndquadrant.com>)
Re: Free Space Map thoughts  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera wrote:
> Simon Riggs wrote:
>> Presumably we would not store an FSM for small tables? On the basis that
>> the purpose of the FSM is to save on pointless I/O there must be a size
>> of table below which an FSM is just overhead.
> 
> Hmm, do you mean that we would open and verify every page of a small
> relation until we find one with free space?  That doesn't sound very
> good.

There is a threshold somewhere. If the heap consists of just one page, 
clearly the FSM doesn't give any benefit. If it's two pages, it's 
probably still faster to just check the two pages. Somewhere after that 
the FSM starts to pay off.

Whether the overhead is big enough that we care to optimize by not 
having the FSM for tiny tables, I don't know. Probably not. If the FSM 
is stored in the heap file, it's tricky to add the FSM after the fact. 
If it's a separate file, creating the FSM requires catalog changes.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: [PERFORM] Estimation problem with a LIKE clause containing a /
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Free Space Map thoughts