![]() |
|
There's more than one way to do things | |
PerlMonks |
Re: Multiple write locking for BerkeleyDBby samtregar (Abbot) |
on Apr 23, 2008 at 20:13 UTC ( #682485=note: print w/replies, xml ) | Need Help?? |
How did you code your MySQL solution? What storage type did you use? I bet this will perform great, and I'm pretty sure it's guaranteed atomic for MyISAM and InnoDB (would have to check to be sure):
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
In Section
Seekers of Perl Wisdom
|
|