Thread: Clustering system catalog indexes

Clustering system catalog indexes

From
Christopher Kings-Lynne
Date:
Is it worth us marking any system catalog indexes as clusterable by 
default for performance?

Chris



Re: Clustering system catalog indexes

From
Bruce Momjian
Date:
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,
Pennsylvania19073
 


Re: Clustering system catalog indexes

From
Alvaro Herrera
Date:
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)


Re: Clustering system catalog indexes

From
Christopher Kings-Lynne
Date:
> 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


Re: Clustering system catalog indexes

From
Bruce Momjian
Date:
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,
Pennsylvania19073
 


Re: Clustering system catalog indexes

From
Bruce Momjian
Date:
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,
Pennsylvania19073