4 ms·
The problem you'll find is that job queues, message queues, etc are actually edge cases. You can implement them in a DB, sure, but to do so with acceptable perf
by kogir 10y ago
The problem you'll find is that job queues, message queues, etc are actually edge cases. You can implement them in a DB, sure, but to do so with acceptable performance will require deep knowledge of the storage engine, query planner, locking, and DB specific extensions.
For just one example: https://www.mssqltips.com/sqlservertip/1257/processing-data-queues-in-sql-server-with-readpast-and-updlock/ https://www.mssqltips.com/sqlservertip/1257/processing-data-...
I can't find the article, but I remember reading that to get acceptable performance in SQL Server Service Broker it (under the hood) actually padded rows to ensure there was only one item per page on disk (or something similarly implementation specific to SQL Server).