Home > database >  Mongo. Driver2.2.4 c # drive slowly
Mongo. Driver2.2.4 c # drive slowly

Time:09-29

Everybody is good, I use a MongoDB3.2.8 version, there are 200 w data, in the mongo shell query 33 w data only 400 ms, but the official driver in c # (2.2.4) query, need 200 s +, please everyone a great god, is this why??? The gap is too big ah, ah, genuflect is begged bothers me for a few days, only 20 points, don't abandon oh

CodePudding user response:

Part attached screenshot

CodePudding user response:

Jacked up!!!!! Don't sink!

CodePudding user response:

CodePudding user response:

To help the top
Well, I'm afraid yo, difficult to integrate?

CodePudding user response:

Database connection will consume time, MongoDatabase singleton pattern, get only once, and consumption are on this side,

CodePudding user response:

330000 data of a query, serialized objects into memory, must be very slow,
Shell tool, must will code quickly, is inevitable.

CodePudding user response:

Commonly used to give some retrieval fields indexed
 db. Collectionname. EnsureIndex ({fieldName: 1}, {name: 'IX_fieldName}) 

CodePudding user response:

You should only check the count number, see also not slow?
  • Related