Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2356

Add support for $explain

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: CRUD
    • None
    • Not Needed

      The essence of request is very simple: to add `explain` as a natively supported feature.

      Currently, the only way to do it seems to be to call a `Database.RunCommand()`, which requires manually constructing the query document. Primitives like `operation.NewFind()` do not expose enough to construct query document with it.

      As a result, not only does the use of `explain` require extra effort, it is prone to mistakes when the query being explained will end up being not the same query as you would execute using the normal driver API.

      Use cases that I know of include diagnostic tools and testing mechanisms that validate existing queries in regard of conforming with indexes and sharding.

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            petr.ivanov.s@gmail.com Peter Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: