MongoDB.collectionExists() is slow (calls getCollectionNames())

18 views
Skip to first unread message

Allan Brighton

unread,
Jul 28, 2015, 9:58:28 AM7/28/15
to mongodb-casbah-users
I wonder if it is possible to implement MongoDB.collectionExists() without calling MongoDB.getCollectionNames().
I found this to be a performance bottleneck when there are lots of collections.
The only workaround was to cache the list of collections in a Map, when possible.



Reply all
Reply to author
Forward
0 new messages