Parallel mysql queries in php?-ThrowExceptions

Exception or error:

I am sharding my data into multiple mysql databases, but sometimes I will need to gather information from multiple shards. How can I query multiple mysql databases in parallel in php?

I’ve seen some examples of asynchronous curl requests and shell_exec, but is there a more direct way?

How to solve:

The new mysqlnd driver can perform asynchronous queries. Documentation is sparse, but there are some examples (also relating to sharding) in a presentation here.

Leave a Reply

Your email address will not be published. Required fields are marked *