Re: Free Space Map thoughts

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Free Space Map thoughts
Date: 2007-11-09 09:23:36
Message-ID: 47342718.5060701@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-11-09 09:29:28 Re: Free Space Map thoughts
Previous Message Gregory Stark 2007-11-09 09:21:56 Re: [HACKERS] Estimation problem with a LIKE clause containing a /