How to get multiple documents

Hey @avsej ,

I need to get multiple documents in the same time from DB, in the past with a Python client there was an option to do get multi, using the latest PHP SdK, I cannot find a way to get mutliple documents in the same time.

I see there is an option to start a few threads to push the data in the db, but, how I can do the other way around?

I would appreciate a fast answer.

Right now there is no API for getMulti in PHP SDK.

Thank you for your fast answer.

my replica … oooh nooooo… what can I do now?

The problem I have is that I need to get like 2000 different documents to render a page, and each document takes like 0.4 seconds (not sure why takes so long), so it is not a solution to get each one in serial order, so, I need to find a way to do it parallel. The DB can handle easily 400k documents per second, but not sure why takes so long from this PHP script. The bucket has like 10k documents, is all in memory, and servers DB load is under 1%

The documents are between 10k and 200k

Probably you can use N1QL to fetch all these documents in single query?