Comments on: How to implement a queue in SQL http://www.xaprb.com/blog/2007/01/11/how-to-implement-a-queue-in-sql/ Stay curious! Mon, 13 May 2013 05:55:40 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Xaprb http://www.xaprb.com/blog/2007/01/11/how-to-implement-a-queue-in-sql/#comment-18452 Xaprb Tue, 29 Jun 2010 12:52:24 +0000 http://www.xaprb.com/blog/?p=290#comment-18452 Glancing at it briefly, I think it’ll suffer under high traffic. But, I believe, so will my original post above — I wrote this at a time when I didn’t have that much experience with queues in MySQL. Since then I’ve seen that it is a hard problem that rarely scales well.

]]>
By: Thomas http://www.xaprb.com/blog/2007/01/11/how-to-implement-a-queue-in-sql/#comment-18447 Thomas Mon, 28 Jun 2010 13:52:04 +0000 http://www.xaprb.com/blog/?p=290#comment-18447 Interesting approaches, but most of them have the problem to lock the table on concurrent access. If one takes InnoDB as table type, the performance of MAX() falls by the wayside and using MyISAM would bring the aforementioned concurrency problem when reading and writing in parallel. I use a modified approach by Robert Eisele as a my queue logic, which outperforms the presented approaches: http://www.xarg.org/2009/09/fast-circular-buffer-in-mysql/

Thomas

]]>
By: Rdb Notes · How to implement a queue in SQL at Xaprb http://www.xaprb.com/blog/2007/01/11/how-to-implement-a-queue-in-sql/#comment-13353 Rdb Notes · How to implement a queue in SQL at Xaprb Thu, 30 Aug 2007 15:03:28 +0000 http://www.xaprb.com/blog/?p=290#comment-13353 [...] How to implement a queue in SQL at Xaprb This article explains how to create a fixed-size FIFO (first-in, first-out) queue in SQL, where rows added after a threshold will cause the oldest row to be deleted. There are several ways to do this, but MERGE on Oracle and DB2, and MySQL’s non-standard extensions to SQL, make an elegant solution easy. [...]

]]>
By: Anish http://www.xaprb.com/blog/2007/01/11/how-to-implement-a-queue-in-sql/#comment-12506 Anish Tue, 24 Jul 2007 06:23:26 +0000 http://www.xaprb.com/blog/?p=290#comment-12506 Great article! How do I ensure unique value in fruit column, say no other rows should have ‘peaches’ if it is already in queue

]]>
By: Xaprb http://www.xaprb.com/blog/2007/01/11/how-to-implement-a-queue-in-sql/#comment-5410 Xaprb Fri, 30 Mar 2007 13:19:45 +0000 http://www.xaprb.com/blog/?p=290#comment-5410 It might work to use a calculation like TO_DAYS(CURRENT_DATE) % 60, or some variation thereof.

]]>