Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-5871

Add field "keyspace_alias" to the output of Advise stmt

    XMLWordPrintable

Details

    • DOC-2019-S22-Nov01
    • 1

    Description

      In the output of advise stmt: add "keyspace_alias" field to each index object: (current index, recommended index, recommended covering index) to specify the keyspace and the corresponding alias (if any) to which the index belongs. That will help to distinguish the indexes for each side of join operation.

         {
              "#operator": "Advise",
              "advice": {
                  "#operator": "IndexAdvice",
                  "adviseinfo": [
                      {
                          "current_indexes": [
                              {
                                  "index_statement": "CREATE PRIMARY INDEX #primary ON `travel-sample`",
                                  "keyspace_alias": "travel-sample_t1"
                              }
                          ],
                          "recommended_indexes": {
                              "covering_indexes": [
                                  {
                                      "index_statement": "CREATE INDEX adv_type_id_c1 ON `travel-sample`(`type`,`id`,`c1`)",
                                      "keyspace_alias": "travel-sample_t1"
                                  }
                              ],
                              "indexes": [
                                  {
                                      "index_statement": "CREATE INDEX adv_type_id ON `travel-sample`(`type`,`id`)",
                                      "keyspace_alias": "travel-sample_t1",
                                      "recommending_rule": "Index keys follow order of predicate types: 2. equality/null/missing, 5. less than/between/greater than."
                                  }
                              ]
                          }
                      }
                  ]
              },
              "query": "select c1 from `travel-sample` t1 where type =\"route\" and id <10;"
          }
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              simon.dew Simon Dew
              chang.liu Chang Liu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty