mongo insert a document data is very slow

Viewed 19

I am facing issue with insert of mongo. When I use insert_one to insert data in IDEA, the code takes a few seconds to response on average, while using insert_many to insert all the data that needs to be inserted only takes a few seconds. However, the interesting thing is that the same data inserted using Navicat takes milliseconds. Another interesting point is that when I run the code on mac book, it is several times faster than windows, and the time difference between the two is obvious.In other high configuration windows environment, it will also be very slow. By the way, when I query data, the response is fast, in any environment.

0 Answers
Related