Re: FILLFACTOR and increasing index - Mailing list pgsql-general

From Tomas Vondra
Subject Re: FILLFACTOR and increasing index
Date
Msg-id 4DCB0D9B.5060207@fuzzy.cz
Whole thread Raw
In response to Re: FILLFACTOR and increasing index  (Leonardo Francalanci <m_lists@yahoo.it>)
Responses Re: FILLFACTOR and increasing index  (Boszormenyi Zoltan <zb@cybertec.at>)
List pgsql-general
Hi,

I've studied the implementation of the btree indexes and how exactly the
fillfactor is used, and in general

- when a page split happens, the process needs to obtain more locks
  than with simple insert, which may result in contention with other
  processes that modify the index (the same pages)

- the fillfactor is used only for the leaf pages, the rest of the index
  does not use it (directly)

So lowering the number of page splits might remove some contention when
there's a lot of processes accessing the same pages.

But that's the theory - I really was not able to come up with a test
that benefits from lower fillfactor. Actually the lower the fillfactor,
the larger the index, which may be a significant issue with huge indexes.

So in your case, I'd probably go with the default fillfactor (90), and
maybe I'd consider even using fillfactor=100, to make the index as dense
as possible.

Anyway I guess the impact of this will be negligible, compared to other
parameters (shared buffers, work_mem, etc.).

regards
Tomas

pgsql-general by date:

Previous
From: salah jubeh
Date:
Subject: Re: PGA
Next
From: "Joshua J. Kugler"
Date:
Subject: Re: Urgent Order