MongoDB slow fetching using MongoDB C# driver 2.13

98 Views Asked by At

I'm trying to fetch 40000-50000 documents from the MongoDB collection using the MongoDB c# driver. It's taking more than 1 min to fetch documents(40000 docs) using the find().toList() method

But we have a requirement to fetch all documents from the collection in 2-3 seconds.

some info about my MongoDB database

Average document size is 58KB and collection contains 50000 documents

Note - The task is to fetch all documents in 2-3 seconds // collection.find(new bsondocument()).toList();

Does anyone have a solution for the above task?

thanks in advance.

0

There are 0 best solutions below