Clustering system catalog indexes

Started by Christopher Kings-Lynneover 21 years ago6 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

Is it worth us marking any system catalog indexes as clusterable by
default for performance?

Chris

#2Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: Clustering system catalog indexes

Christopher Kings-Lynne wrote:

Is it worth us marking any system catalog indexes as clusterable by
default for performance?

Not sure. Most of the system stuff is loaded in a pretty good order, and
cluster is only good if you are going after seveal rows of identical
value or similar value in the same table, and I can't think of a case
where this would help. Can others? It is a good question.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Bruce Momjian (#2)
Re: Clustering system catalog indexes

On Wed, May 19, 2004 at 09:43:22PM -0400, Bruce Momjian wrote:

Christopher Kings-Lynne wrote:

Is it worth us marking any system catalog indexes as clusterable by
default for performance?

Not sure. Most of the system stuff is loaded in a pretty good order, and
cluster is only good if you are going after seveal rows of identical
value or similar value in the same table, and I can't think of a case
where this would help. Can others? It is a good question.

pg_attribute maybe?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"C�mo ponemos nuestros dedos en la arcilla del otro. Eso es la amistad; jugar
al alfarero y ver qu� formas se pueden sacar del otro" (C. Halloway en
La Feria de las Tinieblas, R. Bradbury)

#4Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Bruce Momjian (#2)
Re: Clustering system catalog indexes

Not sure. Most of the system stuff is loaded in a pretty good order, and
cluster is only good if you are going after seveal rows of identical
value or similar value in the same table, and I can't think of a case
where this would help. Can others? It is a good question.

pg_attribute would commonly be fetched via the attrelid. However, I
guess it's all cached anyway...

Chris

#5Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Alvaro Herrera (#3)
Re: Clustering system catalog indexes

Alvaro Herrera wrote:

On Wed, May 19, 2004 at 09:43:22PM -0400, Bruce Momjian wrote:

Christopher Kings-Lynne wrote:

Is it worth us marking any system catalog indexes as clusterable by
default for performance?

Not sure. Most of the system stuff is loaded in a pretty good order, and
cluster is only good if you are going after seveal rows of identical
value or similar value in the same table, and I can't think of a case
where this would help. Can others? It is a good question.

pg_attribute maybe?

Ah, good point. Because of vacuum reuse, it could grab rows in
different locations when creating a table. Good point.

Added to TODO:

o Add default clustering to system tables

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#6Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Christopher Kings-Lynne (#4)
Re: Clustering system catalog indexes

Christopher Kings-Lynne wrote:

Not sure. Most of the system stuff is loaded in a pretty good order, and
cluster is only good if you are going after seveal rows of identical
value or similar value in the same table, and I can't think of a case
where this would help. Can others? It is a good question.

pg_attribute would commonly be fetched via the attrelid. However, I
guess it's all cached anyway...

Yes, but that cache has to be loaded sometime.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073