assume a single document type:
{
"_id" : ObjectId("5a19403b421aa92332bc2b32"),
"id" : "95957f4a9eab11e787f1509a4c4be0cd"
"incre" :1
"city" ""
}
data volume, 90 million, how to quickly extract all, city is all the id of Beijing.
where incre is a self-increasing id.
I use the following method, 100 threads, fetching 20 pieces of data at a time according to incre, and polling 90 million data from 1:
find({"$and":[{"city":""},{"incre":{"$gte":50,"$lt":70}}]})
suppose the query takes 1 second, 2000 threads, and 100 pieces of data in 1 second.
90m data, 750hrs.
is there a faster way?
turn to the Great God.
Thank you.
-where are all the bosses?-