If your calculation is “reasonable”, then you should definitely do this in raw SQL with one big query. Don’t iterate over each row, drag it into PHP and do the calculation there - instead, do the whole thing in one big query. It will be so so fast. You will have a huge sql query in your code though, but otherwise you have your complexity elsewhere.
Dude you need to publish this online somewhere! This is amazing. You’re basically an open source archivist, you need your own dedicated library my man.
Very clever.
€
If your calculation is “reasonable”, then you should definitely do this in raw SQL with one big query. Don’t iterate over each row, drag it into PHP and do the calculation there - instead, do the whole thing in one big query. It will be so so fast. You will have a huge sql query in your code though, but otherwise you have your complexity elsewhere.
Dude you need to publish this online somewhere! This is amazing. You’re basically an open source archivist, you need your own dedicated library my man.
Generational misunderstanding 🤷♂️ you’re old, like me