Re: Fast reference without an index?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: pgsql(at)mohawksoft(dot)com
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fast reference without an index?
Date: 2005-02-08 21:36:03
Message-ID: 20050208213603.GA32494@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 08, 2005 at 04:29:34PM -0500, pgsql(at)mohawksoft(dot)com wrote:
> > pgsql(at)mohawksoft(dot)com writes:
> >> Is there a way, and if I'm being stupid please tell me, to use something
> >> like a row ID to reference a row in a PostgreSQL database? Allowing the
> >> database to find a specific row without using an index?
> >
> > ctid ... which changes on every update ...
>
> Well, how does an index do it?

The index _is_ updated on every update. And on vacuum too, of course;
so you'd also need to hack VACUUM to make sure your reference is
updated.

Maybe you could store your data in a GiST index ...

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"[PostgreSQL] is a great group; in my opinion it is THE best open source
development communities in existence anywhere." (Lamar Owen)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hallgren 2005-02-08 22:12:07 Interpretation of TRUSTED
Previous Message pgsql 2005-02-08 21:29:34 Re: Fast reference without an index?