Re: Performance (was: The New Slashdot Setup (includes MySql server))

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Michael A(dot) Olson" <mao(at)sleepycat(dot)com>, "Matthias Urlichs" <smurf(at)noris(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Performance (was: The New Slashdot Setup (includes MySql server))
Date: 2000-05-20 05:30:08
Message-ID: 11929.958800608@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
>>>> I know another case. pg_attrdef has no index on (adrelid,attnum)
>>>> though it has an index on (adrelid).
>>
>> Doesn't look to me like we need an index on (adrelid,attnum), at
>> least not in any paths that are common enough to justify maintaining
>> another index. The (adrelid) index supports loading attrdef data
>> into the relcache, which is the only path I'm particularly concerned
>> about performance of...

> It seems to me that an index on (adrelid,adnum) should
> exist instead of the current index. It identifies pg_attrdef.
> I say *Oops* about it in my trial implementation of ALTER
> TABLE DROP COLUMN.

Right, I saw that. But it seems to be the only place where such an
index would be useful. The relcache-loading routines, which seem to
be the only performance-critical access to pg_attrdef, prefer an index
on adrelid only. Is it worth maintaining a 2-column index (which is
bulkier and slower than a 1-column one) just to speed up ALTER TABLE
DROP COLUMN?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sascha Ziemann 2000-05-20 05:56:03 bool and NOT
Previous Message Hiroshi Inoue 2000-05-20 05:25:26 RE: Performance (was: The New Slashdot Setup (includes MySql server))

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-05-20 06:30:21 Re: Postgres Analysis Tool-Pak
Previous Message Hiroshi Inoue 2000-05-20 05:25:26 RE: Performance (was: The New Slashdot Setup (includes MySql server))