Skip to content

Missing index on key property on Mongodb #291

Description

@gkampitakis

In my company, we are using this library. I am guessing it's no longer maintained but I thought it would be worth creating an issue, in case someone else comes across with the same issue.

This library creates an index for querying the collection

collection.ensureIndex({_bucketname: 1, key: 1}, function(err){

The problem appears when setting the useSingle to false, as we are querying the collections using the {key:<value>}

var updateParams = (self.useSingle? {_bucketname: bucket, key:key} : {key:key});

meaning we are not using the created index resulting to slow queries not taking advantage of the index.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions