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

[N1QL Adaptive Index] Queries not having "NOT" are timing out with adaptive index

    XMLWordPrintable

Details

    • Bug
    • Resolution: Resolved
    • Major
    • 5.0.0
    • 4.6.4
    • query
    • 4.6.4-4554
    • Untriaged
    • No

    Description

      Query which times out:
      SELECT AVG( DISTINCT int_field1 ) FROM multiple_table_db_3506_simple_table_1 WHERE ((bool_field1 OR (decimal_field1 IS NULL) OR (int_field1 < 5114))) OR ((((decimal_field1 IS NULL) AND (int_field1 IS NULL)) OR (int_field1 IN [ 8 , 14 , 18 , 36 , 58 ]) OR varchar_field1 <= "ZsRagOVllG")) GROUP BY primary_key_id , varchar_field1

      Index created:
      CREATE INDEX `idx_multiple_table_db_3506_simple_table_1` ON `multiple_table_db_3506_simple_table_1`((distinct (array `v` for `v` in pairs(self) end))) WITH

      { "defer_build"=true }

      There are many such queries which are timing out.
      I see these after removing like and not like operator.
      Also removed NOT( condition ) from grammar.

      Attaching logs.

      Attachments

        Issue Links

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

          Activity

            People

              Donald.haggart Donald Haggart
              Prerna.Manaktala Prerna Manaktala (Inactive)
              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