I have a very long complicated script that does around 40 calculations per row of data from a MySQL database and it gets really slow after the first 40 rows, is there any way to speed this up?
rectifing your SQL query will speed up...