Re: Clustering system catalog indexes

Lists: pgsql-hackers
From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Clustering system catalog indexes
Date: 2004-04-28 06:04:34
Message-ID: 408F4972.6050802@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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

Chris


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clustering system catalog indexes
Date: 2004-05-20 01:43:22
Message-ID: 200405200143.i4K1hMe09781@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clustering system catalog indexes
Date: 2004-05-20 02:02:17
Message-ID: 20040520020217.GA13544@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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)


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clustering system catalog indexes
Date: 2004-05-20 02:09:53
Message-ID: 40AC1371.1010609@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> 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


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clustering system catalog indexes
Date: 2004-05-20 02:58:32
Message-ID: 200405200258.i4K2wWD20880@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clustering system catalog indexes
Date: 2004-05-20 02:58:51
Message-ID: 200405200258.i4K2wpd20987@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073