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

CLONE - LIMIT is pushed intersectscan wrongly with adaptive index

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • 5.5.0
    • 4.6.5, 5.1.0, 5.5.0
    • query
    • None
    • Triaged
    • Unknown

    Description

      CREATE INDEX ix1 ON default(c1,c2);
      CREATE INDEX ixa ON default(DISTINCT PAIRS(self));
      EXPLAIN SELECT c3,c1,c2 FROM default WHERE c1 >= 5 ORDER BY c2 LIMIT 5;
      IntersectScan should not have limit because There is ORDER BY and OrderedIntersectScan is not used.
       
      CREATE INDEX `I_CUS` ON `T_SIM_DEVICE`(`CUSTOMER_ID`);
      CREATE INDEX `ai_SIM` ON `T_SIM_DEVICE`((distinct (pairs({`CALC_RAG_STATUS`, `CUSTOMER_ID`, `CUSTOMER_PROFILE_ID`, `CUSTOMER_PROFILE_NAME`, `DT_TIM_FIRST_USED`, `DT_TIM_RECORD_CREATED`, `DT_TIM_STARTED_ACTIVETEST`, `ECALL_PROFILE`, `ICCID`, `IMEI`, `IMSI`, `MSISDN`, `NGIN_VPN_GROUP_NAME`, `STATIC_IP_ADDRESSES`, `TIM_HAS_BEEN_ACTIVELIVE`, `TIM_HAS_BEEN_ACTIVETEST`, `TIM_ID`, `TIM_STATE`}))));
      explain select MSISDN from T_SIM_DEVICE WHERE CUSTOMER_ID = "551" ORDER BY MSISDN ASC LIMIT 2 OFFSET 0 ;
      IntersectScan should not have limit
      

      Attachments

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

        Activity

          People

            ajay.bhullar Ajay Bhullar
            mihir.kamdar Mihir Kamdar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty