Re: Performance (was: The New Slashdot Setup (includes MySql server)) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Performance (was: The New Slashdot Setup (includes MySql server))
Date
Msg-id 11929.958800608@sss.pgh.pa.us
Whole thread Raw
In response to RE: Performance (was: The New Slashdot Setup (includes MySql server))  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses RE: Performance (was: The New Slashdot Setup (includes MySql server))  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.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


pgsql-hackers by date:

Previous
From: "Hiroshi Inoue"
Date:
Subject: RE: Performance (was: The New Slashdot Setup (includes MySql server))
Next
From: Chris
Date:
Subject: Re: OO Patch