Hi There,
I have a website that has about 11,000 fantasy football teams in it and I need to hit each one, find out their highest scoring players at each position and save that in a field in the DB.
Currently I have a query that grabs sorts all the players on the team by score DESC, then I read that into a page with PHP and check which scores are the highest. I'll them save the total score and put those players in a comma separated field in the DB.
This is no problem with one team, but when I run this against all 11K teams in the DB, it takes a long time. I'm on 9 minutes now and it's through about 3500 teams.
I need thoughts on how to perform this function faster.
I was wondering if I could break it up into 4 or 5 scripts and run them simultaneously or if there would be a better way to do it?
I have a website that has about 11,000 fantasy football teams in it and I need to hit each one, find out their highest scoring players at each position and save that in a field in the DB.
Currently I have a query that grabs sorts all the players on the team by score DESC, then I read that into a page with PHP and check which scores are the highest. I'll them save the total score and put those players in a comma separated field in the DB.
This is no problem with one team, but when I run this against all 11K teams in the DB, it takes a long time. I'm on 9 minutes now and it's through about 3500 teams.
I need thoughts on how to perform this function faster.
I was wondering if I could break it up into 4 or 5 scripts and run them simultaneously or if there would be a better way to do it?