Got two hints worth a try:
Instead of changing max_execution_time in php.ini, you can use the set_time_limit function for single scripts.
Furthermore, if you have many huge repeated joins to calculate, you could think of using a temporary table. I once increased speed in a cross-calculation table generation script by more than 10 times using a temp table that holds the basic join. I queried this table for the single selects.
And, I was told that dropping and re-creating the temp table every time was notably faster than doing a delete from each time. (I had to deal with >5000 records per script.)
perhaps this helps you.