From: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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 16:28:31 |
Message-ID: | NDBBIJLOILGIKBGDINDFOEFACFAA.Inoue@tpf.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
>
> "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?
>
I don't mind so much about the performance in this case.
The difference would be little.
Isn't it a fundamental principle to define primary(unique
identification) constraint for each table ?
I had never thought that the only one index of pg_attrdef
isn't an unique identification index until I came across the
unexpcted result of my DROP COLUMN test case.
Comments ?
Regards.
Hiroshi Inoue
Inoue(at)tpf(dot)co(dot)jp
From | Date | Subject | |
---|---|---|---|
Next Message | moebius | 2000-05-20 16:30:31 | Re: RPM troubleshoot |
Previous Message | Tom Lane | 2000-05-20 16:19:51 | Re: rules on INSERT can't UPDATE new instance? |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael A. Olson | 2000-05-20 16:56:59 | Re: Berkeley DB license |
Previous Message | Mitch Vincent | 2000-05-20 16:25:11 | Re: contextual search |