Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: John Lumby <johnlumby(at)hotmail(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: REINDEX : new parameter to preserve current average leaf density as new implicit FILLFACTOR
Date: 2019-07-08 19:34:14
Message-ID: CAH2-WzmPS0kY_KAYfExG46RUOnOaPz2ErJQ4Lg3V5WVx47+d=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 8, 2019 at 12:19 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> Well, you're still running autovacuum very aggressively here. It'll
> easily keep up when run on a relatively small table such as this.

Also, an exactly equal number of insertions and deletions is rather
likely to result in bloated indexes in a way that probably isn't
representative of many workloads. Even if the number of insertions was
only slightly greater than the number of deletions, then the overall
pattern would be one of continual growth, which is generally
considered much more interesting.

For far far more information on the topic than you want, see the paper
"B-Trees with Inserts and Deletes: Why Free-at-Empty Is Better Than
Merge-at-Half":

https://www.sciencedirect.com/science/article/pii/002200009390020W

The salient point made by the paper is that good space utilization
rests on the assumption that there are fewer deletes than inserts,
though maybe only slightly fewer:

"The tendency of the utilization to remain near 69% can be explained
by the following arguments: If there are even just a few more inserts
than deletes, the B-tree will grow at the net insert rate (the rate of
inserts minus the rate of deletes)."

If the volume of data never grows past a certain point, then it's
unlikely that the space utilization is very important. This may even
be premature optimization.
--
Peter Geoghegan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Kerber 2019-07-08 19:41:04 PGPOOL Question
Previous Message Tom Mercha 2019-07-08 19:20:25 Re: Measuring the Query Optimizer Effect: Turning off the QO?