From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Jean-Luc Lachance <jllachan(at)nsd(dot)ca> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Win2K Questions |
Date: | 2002-11-12 04:31:02 |
Message-ID: | 200211120431.gAC4V2B28675@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Jean-Luc Lachance wrote:
> Tom Lane wrote:
> >
> > Jean-Luc Lachance <jllachan(at)nsd(dot)ca> writes:
> > > What would be involved in adding version and visibility to the index?
> >
> > * Index bloat. An index entry is currently 8 bytes plus the index key,
> > eg 12 bytes for an int4 index. Version info would add 12 bytes.
> > Doubling the size of indexes would double the time for index scans.
>
> That is true for for small keys, but for varchar(20) the impact is less.
>
> >
> > * Update costs. Instead of one place to update when a row is updated,
> > now all the associated index entries would have to be updated too.
>
> The index has to be updated anyhow to reflect the new record. Doesn't
> it?
Actually no. Index scans can go from the index to the heap, see the
tuple is dead, and move on to the next one. We do have some code in 7.3
which updates the index tuple status bit so we know not to look again.
--
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 | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-11-12 05:06:35 | Re: Win2K Questions |
Previous Message | Gyorgy Molnar | 2002-11-12 03:55:20 | bytea - own defined type |