Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong index suggestion when using BinData fields #37

Open
isartmontane opened this issue Mar 14, 2016 · 0 comments
Open

Wrong index suggestion when using BinData fields #37

isartmontane opened this issue Mar 14, 2016 · 0 comments

Comments

@isartmontane
Copy link

We are running dex on our production dataset but we are not getting the right indexes when a BinData field is used.

For example, for the following log line:

2016-03-14T15:33:49.177+0000 I WRITE    [conn826040] update collection query: { _id: BinData(0, 6165363837656337373438316233343862333033363464663961336231353262) } update: { $set: { a: 1 } } nscanned:1 nscannedObjects:1 nMatched:1 nModified:0 keyUpdates:0 writeConflicts:0 numYields:1 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, Database: { acquireCount: { w: 2 } }, Collection: { acquireCount: { w: 2 } } } 1440ms

We get the following suggestion:

        {
            'queryMask': '{"$query":{"6165363837656337373438316233343862333033363464663961336231353262)":"<val>","_id":"<val>"}}', 
            'namespace': 'db.collection', 
            'recommendation': {
                'index': '{"_id": 1, "6165363837656337373438316233343862333033363464663961336231353262)": 1}', 
                'namespace': 'db.collection', 
                'shellCommand': 'db["collection"].ensureIndex({"_id": 1, "6165363837656337373438316233343862333033363464663961336231353262)": 1}, {"background": true})'
            }, 
            'details': {
                'count': 1, 
                'totalTimeMillis': 1440, 
                'avgTimeMillis': 1440
            }
        }, 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant