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

[N1QL][ADVISE] ANSI merge query getting wrong advise

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      When I run this query

      ADVISE MERGE INTO `travel-sample` t
      USING [

      {"id":"21728", "vacancy": true}

      ,

      {"id":"21730", "vacancy": true}

      ] source
      ON meta(t).id = "hotel_" || source.id
      WHEN MATCHED THEN
      UPDATE SET t.old_vacancy = t.vacancy,
      t.vacancy = source.vacancy
      RETURNING meta(t).id, t.old_vacancy, t.vacancy;

      I get this advise output (which is incorrect):

      "recommended_indexes": {
      "indexes": [
      {
      "index_statement": "CREATE INDEX adv_hotel ON `travel-sample`('hotel_')",
      "keyspace_alias": "travel-sample_t",
      "recommending_rule": "Index keys follow order of predicate types: 9. non-static join predicate."

      Attachments

        For Gerrit Dashboard: MB-39093
        # Subject Branch Project Status CR V

        Activity

          People

            ajay.bhullar Ajay Bhullar
            ajay.bhullar Ajay Bhullar
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty