Welcome Guest, Not a member yet? Register   Sign In
Models Remember Vars?
#7

[eluser]JoostV[/eluser]
Calculating on-the-fly is more expensive, true. But if you leave the calculation to MySQL it's very fast indeed, and even PHP calcualtion will be very fast. Also, you could cache the page.

But it's a trade-off, really. It's just that for scaling purposes this looped query could cause a time-out and thus a corrupted database, with some records having been recalculated, and some not.

I'm not a MySQL guru, but there might also be a way to replace the looped queries with a single caculation query that will update all record at once. Don't ask me how, though...


Messages In This Thread
Models Remember Vars? - by El Forum - 11-27-2008, 12:48 PM
Models Remember Vars? - by El Forum - 11-27-2008, 01:46 PM
Models Remember Vars? - by El Forum - 11-28-2008, 03:49 AM
Models Remember Vars? - by El Forum - 11-28-2008, 04:05 AM
Models Remember Vars? - by El Forum - 11-28-2008, 04:25 AM
Models Remember Vars? - by El Forum - 11-28-2008, 04:30 AM
Models Remember Vars? - by El Forum - 11-28-2008, 04:53 AM
Models Remember Vars? - by El Forum - 11-28-2008, 05:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB