1. A computer implemented method for optimizing a query on a parallel computer system comprising the steps of: receiving a query to a database; optimizing the query; initiating the query execution; monitoring the query execution; monitoring a plurality of networks and recording information about network utilization in a network file; detecting a network failure based on the information in the network file indicating a network resource is below a threshold; and in response to the detected network failure, optimizing to re-optimize the query to use a different network to execute the query.