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
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org