DataGrip / mongo-jdbc-driver

This driver is embedded to DataGrip
Apache License 2.0
52 stars 11 forks source link

Test connection too slow #16

Closed trangiaminh closed 9 months ago

trangiaminh commented 3 years ago

I'm using the newest Datagrip with the newest Mongo driver v1.12. But it's too slow when test connection / open a connection to query, it took great than 17s :( And it's the same when execute a simple query (find with limit 10 item) on a collection >10s :(

I checked Mongo driver other versions and summary in here (test connection - query time):

Could you @kornilova203 please check this issue and give me some advices?

kornilova203 commented 3 years ago

@trangiaminh, yes, unfortunately you are right

https://github.com/mongodb-js/mongosh for some reason now runs very slow in Java driver. I'll investigate the issue

trangiaminh commented 2 years ago

@kornilova203 I hope the good news day by day :)

I don't understand yet about https://github.com/mongodb-js/mongosh? It uses Mongo java driver to interact with MongoDB, right?

kornilova203 commented 2 years ago

@trangiaminh, it's a bit more complicated. This JDBC driver uses Java mongosh. Java Mongosh uses Mongo java driver under the hood and knows how to interpret MongoDB commands written in JavaScript like db.collection.find({}). Mongo java driver itself cannot run MongoDB commands that are written in JavaScript.

trangiaminh commented 2 years ago

@kornilova203 Currently, only you develop Mongo Driver for DataGrip?

kornilova203 commented 2 years ago

@trangiaminh, yes

tjlee commented 2 years ago

@trangiaminh you can also follow an issue https://youtrack.jetbrains.com/issue/DBE-14376 to track progress

leejh3224 commented 2 years ago

Any update on this issue? The latest driver (v1.13) still lags on the initial connection. (takes more than 20s)

tjlee commented 2 years ago

At the moment we're investigating this issue. Stay tuned!

kornilova203 commented 9 months ago

I made some optimizations a while ago:

the very first connection will take ~6 seconds but all the subsequent connections should be almost instant.

https://youtrack.jetbrains.com/issue/DBE-14376/Slow-initial-MongoDB-connection#focus=Comments-27-6129076.0-0

I'll close this issue as obsolete