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

Improve index advisor to handle `self` queries

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Major
    • feature-backlog
    • 7.0.0-Beta1
    • query
    • None
    • 1

    Description

      SELECT ENCODED_SIZE(d)
      FROM `EverC` AS d
      WHERE ENCODED_SIZE(d) > 230 
      and ENCODED_SIZE(d) < 247;
      

      Above query recommends covered secondary index.

      SELECT ENCODED_SIZE(self)
      FROM `EverC` 
      WHERE ENCODED_SIZE(self) > 230 
      and ENCODED_SIZE(self) < 247;
      

      But the same query with "self" only recommends the primary index.  I understand that the indexer may not be able to use the planner for `self` but in the advisor perhaps we could have a special message that says "if using `self`, please replace with a proper alias to advise on the query.  A query that uses `self` will function in the same way"

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            perry Perry Krug
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty