I'm not sure I understand your database design, but I think you might need a more complex design with more tables and intersect tables for the many-to-many relationships.
For example:
Main Tables
---------
runners
races
stations
times
Intersect Tables
----------------------
raceTimes
raceRunners
raceStations
runnerTimes
stationTimes
That way you could pull the times for a particular runner, information about a particular race, the times for a particular station in a particular race, or the runners in a particular race and their stations times, etc. much faster than having to wade through every record in the DB for any kind of data.
I used to know a lot more about database design than I do now. I haven't done anything complex for a long time, so I could be full of crap here.
I think your print_r() statement is also taking a lot of time.
---------------------------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using . . . PLEASE!
MODX info for everyone:
http://bobsguides.com/modx.html