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

wrongly pushed index pushdowns

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.5.0, Cheshire-Cat, 6.5.1
    • 6.6.0, 7.0.0
    • query
    • Untriaged
    • 1
    • Yes

    Description

      create index ix10 ON default(c1, arr1,c2,c3);
      EXPLAIN SELECT COUNT(1) FROM default AS d WHERE d.c1 = 10 AND ANY v IN d.arr1 SATISFIES v IN [10] END AND d.c2 IS NOT MISSING AND (d.c3 = 30 OR d.c3 = 40) ;

      Pushed Index aggregation which is wrong. because ANY predicate not pushed to indexer because it is not array index key and false positives possible.

      Works in Pre 6.5.0

      INSERT INTO default VALUES("k01",{"c1":10, "c2":20, "c3":30, "arr1":[100]});
      

      By pushing indexer indexer will count because index scans all arr1 values but when use any other index row eliminated because array doesn't contain 10.

      Attachments

        Issue Links

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

          Activity

            Sitaram.Vemulapalli Sitaram Vemulapalli created issue -
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Field Original Value New Value
            Link This issue is triggered by CBSE-8500 [ CBSE-8500 ]
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Affects Version/s 6.5.0 [ 15037 ]
            Affects Version/s Cheshire-Cat [ 15915 ]
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Is this a Regression? Unknown [ 10452 ] Yes [ 10450 ]
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Description create index ix10 ON default(c1, arr1,c2,c3);
            EXPLAIN SELECT COUNT(1) FROM default AS d WHERE d.c1 = 10 AND ANY v IN d.arr1 SATISFIES v IN [10] END AND d.c2 IS NOT MISSING AND (d.c3 = 30 OR d.c3 = 40) ;

            Pushed Index aggregation which is worng. because ANY predicate not pushed to indexer because it is not array index key and false positives possible.
            create index ix10 ON default(c1, arr1,c2,c3);
            EXPLAIN SELECT COUNT(1) FROM default AS d WHERE d.c1 = 10 AND ANY v IN d.arr1 SATISFIES v IN [10] END AND d.c2 IS NOT MISSING AND (d.c3 = 30 OR d.c3 = 40) ;

            Pushed Index aggregation which is wrong. because ANY predicate not pushed to indexer because it is not array index key and false positives possible.

            Works in Pre 6.5.0
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Assignee Kamini Jagtiani [ kamini.jagtiani ] Sitaram Vemulapalli [ sitaram.vemulapalli ]
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Description create index ix10 ON default(c1, arr1,c2,c3);
            EXPLAIN SELECT COUNT(1) FROM default AS d WHERE d.c1 = 10 AND ANY v IN d.arr1 SATISFIES v IN [10] END AND d.c2 IS NOT MISSING AND (d.c3 = 30 OR d.c3 = 40) ;

            Pushed Index aggregation which is wrong. because ANY predicate not pushed to indexer because it is not array index key and false positives possible.

            Works in Pre 6.5.0
            create index ix10 ON default(c1, arr1,c2,c3);
            EXPLAIN SELECT COUNT(1) FROM default AS d WHERE d.c1 = 10 AND ANY v IN d.arr1 SATISFIES v IN [10] END AND d.c2 IS NOT MISSING AND (d.c3 = 30 OR d.c3 = 40) ;

            Pushed Index aggregation which is wrong. because ANY predicate not pushed to indexer because it is not array index key and false positives possible.

            Works in Pre 6.5.0


            {code:java}
            INSERT INTO default VALUES("k01",{"c1":10, "c2":20, "c3":30, "arr1":[100]});
            {code}
            By pushing indexer indexer will count because index scans all arr1 values but when use any other index row eliminated because array doesn't contain 100.


            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Link This issue is triggered by MB-30422 [ MB-30422 ]
            till Till Westmann made changes -
            Link This issue blocks MB-38724 [ MB-38724 ]
            till Till Westmann made changes -
            Labels approved-for-6.6.0
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Assignee Sitaram Vemulapalli [ sitaram.vemulapalli ] Mihir Kamdar [ mihir.kamdar ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            Sitaram.Vemulapalli Sitaram Vemulapalli made changes -
            Description create index ix10 ON default(c1, arr1,c2,c3);
            EXPLAIN SELECT COUNT(1) FROM default AS d WHERE d.c1 = 10 AND ANY v IN d.arr1 SATISFIES v IN [10] END AND d.c2 IS NOT MISSING AND (d.c3 = 30 OR d.c3 = 40) ;

            Pushed Index aggregation which is wrong. because ANY predicate not pushed to indexer because it is not array index key and false positives possible.

            Works in Pre 6.5.0


            {code:java}
            INSERT INTO default VALUES("k01",{"c1":10, "c2":20, "c3":30, "arr1":[100]});
            {code}
            By pushing indexer indexer will count because index scans all arr1 values but when use any other index row eliminated because array doesn't contain 100.


            create index ix10 ON default(c1, arr1,c2,c3);
            EXPLAIN SELECT COUNT(1) FROM default AS d WHERE d.c1 = 10 AND ANY v IN d.arr1 SATISFIES v IN [10] END AND d.c2 IS NOT MISSING AND (d.c3 = 30 OR d.c3 = 40) ;

            Pushed Index aggregation which is wrong. because ANY predicate not pushed to indexer because it is not array index key and false positives possible.

            Works in Pre 6.5.0


            {code:java}
            INSERT INTO default VALUES("k01",{"c1":10, "c2":20, "c3":30, "arr1":[100]});
            {code}
            By pushing indexer indexer will count because index scans all arr1 values but when use any other index row eliminated because array doesn't contain 10.


            mihir.kamdar Mihir Kamdar (Inactive) made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            lynn.straus Lynn Straus made changes -
            Fix Version/s 7.0.0 [ 17233 ]
            lynn.straus Lynn Straus made changes -
            Fix Version/s Cheshire-Cat [ 15915 ]

            People

              mihir.kamdar Mihir Kamdar (Inactive)
              Sitaram.Vemulapalli Sitaram Vemulapalli
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty