Re: ctid access is slow

From: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Subject: Re: ctid access is slow
Date: 2005-08-24 16:46:21
Message-ID: 430CA45D.6030400@cheapcomplexdevices.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim C. Nasby wrote:
>
> A better solution is to use a combination of a timestamp and a sequence.
> Why both? Because it's possible for the clock to be set back (though
> this is something best avoided), and a sequence will eventually roll
> over.

With the default MAXVALUE of a postgresql sequence (9 quintillion or so)
you'd need a pretty amazingly fast cluster to roll one over, wouldn't you?
Of course if you choose to truncate them to something smaller they might,
but I'd see little benefit of both truncating and adding a timestamp.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carlos Henrique Reimer 2005-08-24 17:31:06 Re: Postgresql replication
Previous Message Andreas Seltenreich 2005-08-24 16:35:31 Re: Using gdb to obtain statement