When to REINDEX a serial key?

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: When to REINDEX a serial key?
Date: 2021-07-06 09:35:41
Message-ID: 7e6be66c-7bb7-58ff-a490-0837dd73424a@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Server: RDS Postgresql 12.5
Client: Vanilla Postgresql 12.5

Like most systems, we have lots of tables indexed on sequences. Thus, all
new keys are inserted into the "lower right hand corner" of the b-tree.

The legacy RDBMS which I used to manage has a tool for analyzing (*not* in
the Postgresql meaning of the word) an index, and displaying a histogram of
how many layers deep various parts of an index are. Using that histogram,
you can tell whether or not an index needs to be rebuilt.

How does one get the same effect in Postgresql?

--
Angular momentum makes the world go 'round.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Rowley 2021-07-06 09:52:13 Re: When to REINDEX a serial key?
Previous Message hubert depesz lubaczewski 2021-07-06 09:24:39 Re: The Curious Case of the Table-Locking UPDATE Query