in reply to Fast queue logic
You think that moving from flat files to a relational database will make adding things faster? Flat files are nearly always faster than a database for this kind of simple operation. If files seem to be going too slowly for you, you should profile your code to see if there's something taking up the time. There are also a number of nodes on this site that talk about speeding up file access.