c# - Mongo DB - fastest way to retrieve 5 Million records from a collection -


i using mongodb in our project , i'm learning how things work

i have created collection 5 million records. when fire query db.productdetails.find() on console takes time display data.

also when use following code in c#

var products = db.getcollection("productdetails").findall().documents.tolist(); 

the system throws outofmemoryexception after time..

is there other faster or more optimized way achieve ?

never try fetch entries @ same time. use filters or few rows @ time.

read question: mongodb - paging


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -