Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-36436

Query: advisor() function does not produce any results for session

    XMLWordPrintable

Details

    • Triaged
    • Centos 64-bit
    • Unknown

    Description

      Build is 6.5.0-4471

      Course of actions is this:

      • Load `travel-sample` bucket
      • Remove all indexes, primary and secondary
      • Create index 

      CREATE INDEX `def_country` ON `travel-sample`(`country`)

      • Start advisor() session

      select ADVISOR({ 'action' : 'start','duration' : '1m'})

      • run query

      select * from `travel-sample` where country='United States' and type='airline'

      • wait until advisor() session is ended
      • analyze session collected results

      select ADVISOR( { "action" : "get",
       "session": "0f719cdc-394f-4f94-aa82-a419bb94869e" } )

      just change session name with your own session name

      This query gives me nothing, but:

      • run advisor() query for single n1ql query

      SELECT ADVISOR("select * from `travel-sample` where country='United States' and type='airline'")

      This query gives me an advise:

      [
        {
          "$1": {
            "current_used_indexes": [
              {
                "index": "CREATE INDEX def_country ON `travel-sample`(`country`)",
                "statements": [
                  {
                    "run_count": 1,
                    "statement": "select * from `travel-sample` where country='United States' and type='airline'"
                  }
                ]
              }
            ],
            "recommended_indexes": [
              {
                "index": "CREATE INDEX adv_country_type ON `travel-sample`(`country`) WHERE `type` = 'airline'",
                "statements": [
                  {
                    "run_count": 1,
                    "statement": "select * from `travel-sample` where country='United States' and type='airline'"
                  }
                ]
              }
            ]
          }
        }
      ]

      I believe that advisor() function should work totally the same for single query and for session.

      Attachments

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

        Activity

          People

            pierre.regazzoni Pierre Regazzoni
            evgeny.makarenko Evgeny Makarenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty