Re: TODO-Item: B-tree fillfactor control

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: TODO-Item: B-tree fillfactor control
Date: 2006-02-13 12:59:30
Message-ID: 1139835570.1258.761.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Fri, 2006-02-10 at 19:12 +0900, ITAGAKI Takahiro wrote:
> Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > I'm surprised that you do not use the parameter to control the RIGHTMOST
> > index block split factor for B-trees, which remains at a constant 67%.
> > The PCTFREE only seems to apply at CREATE INDEX time.
>
> Thanks for pointing out. I did not inadvertently use fillfactor on
> the rightmost page. With the revised patch, PCTFREE will be considered
> in such cases.
>
> # CREATE TABLE test (i int);
> # INSERT INTO test SELECT generate_series(1, 100000);
> # CREATE INDEX btree ON test USING btree (i) PCTFREE 0;
> # SELECT relpages from pg_class where relname ='btree';
> relpages | 249
> # INSERT INTO test SELECT generate_series(100001, 200000);
> # SELECT relpages from pg_class where relname ='btree';
> relpages | 497 <-- +99.6%
>

This additional functionality looks like it would work for b-trees. I've
not looked at this for GIST and hash indexes.

The reduction in index size should give useful performance gains on
larger, growing tables with increasing keys. We'll test that.

Best Regards, Simon Riggs

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Naeslund(f) 2006-02-13 14:04:38 Postgresql crash (signal 11). keywords: distinct, subselect, union
Previous Message Mark Woodward 2006-02-13 12:57:24 Re: Why don't we allow DNS names in pg_hba.conf?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-02-13 14:57:41 Re: patch correcting the build failure on machines without readline
Previous Message Sergey E. Koposov 2006-02-13 12:31:09 patch correcting the build failure on machines without readline