Incr/Decr Integer - Mailing list pgsql-performance

From William Scott Jordan
Subject Incr/Decr Integer
Date
Msg-id 4A5F69DF.4080408@brownpapertickets.com
Whole thread Raw
Responses Re: Incr/Decr Integer
Re: Incr/Decr Integer
List pgsql-performance
Hey all!

Is there a better way to increase or decrease the value of an integer
than doing something like:

---
UPDATE the_table SET the_int = the_int + 1 WHERE the_id = 123 ;
---

We seem to be getting a lot of deadlocks using this method under heavy
load.  Just wondering if we should be doing something different.

Thanks!

-William

pgsql-performance by date:

Previous
From: Scott Carey
Date:
Subject: Re: cluster index on a table
Next
From: Scott Carey
Date:
Subject: Re: cluster index on a table