| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Perrin Harkins | Date: | September 8 2009 1:08am |
| Subject: | Re: Queue / FIFO in MySQL? | ||
| View as plain text | |||
On Mon, Sep 7, 2009 at 8:18 PM, Allen Fowler<allen.fowler@stripped> 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
| Thread | ||
|---|---|---|
| • Queue / FIFO in MySQL? | Allen Fowler | 8 Sep |
| • Re: Queue / FIFO in MySQL? | Hank | 8 Sep |
| • Re: Queue / FIFO in MySQL? | Perrin Harkins | 8 Sep |
| • Re: Queue / FIFO in MySQL? | Alex Arul Lurthu | 8 Sep |
| • RE: Queue / FIFO in MySQL? | Gavin Towey | 8 Sep |
| • RE: Queue / FIFO in MySQL? | Jerry Schwartz | 8 Sep |
