[eluser]Aea[/eluser]
Inparo, I had no idea that the idea would sound appealing to others, half expected to be told to optimize, optimize, and optimize instead of seeking such a load management solution.
On the pure topic of SQL queries, unfortunately in terms of row count optimizations aren't entirely possible, while such queries will be highly uncommon, a user may want to traverse data back a considerable timespan, and apply calculations to the results. Of course, it would be best to have the system automatically run these queries for the users that require them doing off-peak times. So, while I would usually shy away from doing something which seems to be more complex then necessary for 99% of applications out there, this would be highly beneficial to what I am developing.
I'll continue to think about a mechanism for a queue system, will make another post if I have any revelation about ensuring a script "runs once"
Random Idea : Potentially an endless loop which checks the queue database every x seconds, does its job in that way, and it will be executed on PHP server start up? Of course, there'll need to be isolation so that if something that the queue executes results in an error the queue file doesn't go down with it. A bit of an inelegant solution, would prefer to find a way to know if a script is currently running.