Hello all. The application I am currently working on executes a query on the local box that takes about 15 to 20 seconds to complete. (Query a table with several million records). The returned data is valuable, so the slight delay on this page for the query to run is acceptable.
... but it gets complicated...
Now I need to run the same query on several different databases with the same type of data, but different record sets.
I would like to issue the query to multiple servers all at once, then each server can run it's own process, and all servers should return the result at about the same time. I currently need to run this query on 5 separate database on 5 separate boxes at once.
PHP4, MySql, Linux boxes. Right now, if I run the query, wait for results, then run the next, and so on.... this page will take 60 to 90 seconds to display, but that is too long.
I'd like to run them all in parallel. Tell PHP to issue all 5 queries, then drop the results into record sets as they are returned from their perspective servers, then continue on with the page execution.
I have looked at options that do not wait for a returned result, but this won't work, as I do actually need the returned result.
Any help?
Thanks.