select/update performance?

From: Bjørn T Johansen <btj(at)havleik(dot)no>
To: pgsql-general(at)postgresql(dot)org
Subject: select/update performance?
Date: 2003-11-05 09:24:51
Message-ID: 1068024291.12114.16.camel@pgsqlsrv.havleik.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I need to maintain a manually counter for an id-field, but I can do this
two ways. Either make a counter table (which means one select and one
update) or just selecting the largest id from existing table and
increment by one (just one select + one table lock). Which one is
fastest?

Regards,

BTJ

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Manfred Koizar 2003-11-05 09:25:29 Re: Help on update that subselects other records in table, uses joins
Previous Message Jaime Casanova 2003-11-05 07:46:09 Re: Database design question: ugliness or referential integrity?