Clarification on how you are measuring the query time (for example, is this just execution time, or also including time to convert results into a list).
It was the ToList() that as making the query slow.
However, if I do this:
List<long> ids = new List<long>();
ObjectId objectId = new ObjectId("5c097bfe8c0e481ab8a82b6d");
IMongoQuery query = Query.EQ(MongoChildData.ItemIdProperty, objectId);
var v = childDataCollection.Find(query).SetSortOrder(SortBy.Ascending(MongoChildData.ItemIdProperty, MongoChildData.ChildIdProperty)).SetFields(Fields.Include(MongoChildData.ChildIdProperty)).Select(a => a.ChildId);
foreach (var b in v)
{
ids.Add(b);
}
Then the query hangs after the first 100 ids. Doing a ToList() never seems to return. I estimate that there are around 700,000 child ids to return.