新人求助,mongodb数据库FindAll().ToList()大概80万条数据耗时20多秒,有优化的方法么?
public static List<T> GetAll<T>(string connectionString, string dbName, string collectionName)
where T : EntityBase
{
var db = GetMongoDatabase(connectionString, dbName);
var collection = db.GetCollection<T>(collectionName);
return collection.FindAll().ToList();
}