My concern there would be the number of queries needed during the execution of the script - it could add hundreds of queries during processing. I'm not sure if it helps, but I added a "unset($ranges);" after the loop where it is used to try and minimize the amount of memory being used.
I don't think a DB solution would be "better"; but will let you know if I find something better than the unset().
|