in reply to Multiple write locking for BerkeleyDB
UPDATE table SET counter = counter + 1 WHERE counter_id = ?;
(Assuming you have an index on counter_id of course.)
You also need to look out for the usual DB-usage traps - make sure you're caching your connection between calls, tune your configuration to make appropriate use of memory, etc.
-sam
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Multiple write locking for BerkeleyDB
by dino (Sexton) on Apr 23, 2008 at 20:47 UTC | |
by samtregar (Abbot) on Apr 23, 2008 at 21:07 UTC | |
by dino (Sexton) on Apr 23, 2008 at 21:20 UTC | |
by sgifford (Prior) on Apr 24, 2008 at 03:06 UTC | |
by dino (Sexton) on Apr 24, 2008 at 11:43 UTC | |
| |
by perrin (Chancellor) on Apr 23, 2008 at 20:53 UTC |