On Mon, Sep 7, 2009 at 8:18 PM, Allen Fowler<allen.fow...@yahoo.com> wrote:
> Note: In this scheme the worker winds up with all "new" records generated 
> since the last worker claimed any. Not sure how else to guarantee atomicity. 
> I would prefer "only n records per request". Ideas?

SELECT...FOR UPDATE followed by one or more UPDATEs in a transaction.
Either use MIN(id) to get the next lowest id or ORDER BY and LIMIT to
get n records at a time.

- Perrin

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to