In general, my script is really simple:
- findOne by queryX in collectionA
- findOne by queryX in collectionB (independent from )
- Go on with the results from both, 1 and 2.
Now I have the delay: (2) does not start before (1) is finally completed.
Does the mongodb PHP driver provide an option to pass found queries asynchronously?
Let's say one query takes 5 seconds and two queries takes another 5 seconds. This will increase the script's runtime from 10 to 5 in my scenario.