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

[Dynamic Indexing] SUM related query failed in case of dynamic indexing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.6.2, 5.0.0
    • 5.0.0
    • query
    • None
    • Untriaged
    • No

    Description

      Queries failed:

      SELECT SUM(DISTINCT decimal_field1 ) FROM   multiple_table_db_316_simple_table_1        WHERE   ((NOT (bool_field1) OR decimal_field1 IS NULL)) OR ((primary_key_id  IN [  "1" , "10" , "100" , "1000" , "101"  ] AND decimal_field1 IS NOT NULL))      GROUP BY    int_field1 
      

      SELECT AVG( DISTINCT decimal_field1 ) FROM   multiple_table_db_316_simple_table_1        WHERE   NOT ((bool_field1 OR (int_field1 < 5086) AND (int_field1 IS NOT NULL))) GROUP BY int_field1 , decimal_field1 ,  primary_key_id , varchar_field1 , char_field1
      

      SELECT MIN( decimal_field1 ) FROM  multiple_table_db_316_simple_table_1   WHERE  (NOT (bool_field1) OR varchar_field1 IS NOT NULL) ORDER BY  MIN( int_field1 )
      

      SELECT MIN( decimal_field1 ) FROM simple_table_db_5322_simple_table WHERE (NOT (bool_field1) OR varchar_field1 IS NOT NULL) ORDER BY MIN( int_field1 )
      

      The error obseved:

      [
        {
          "code": 4000,
          "msg": "No index available on keyspace simple_table_db_5322_simple_table that matches your query. Use CREATE INDEX or CREATE PRIMARY INDEX to create an index, or check that your expected index is online.",
          "query_from_user": "SELECT MIN( decimal_field1 ) FROM simple_table_db_5322_simple_table WHERE (NOT (bool_field1) OR varchar_field1 IS NOT NULL) ORDER BY MIN( int_field1 )"
        }
      ]
      
      

      Attachments

        Issue Links

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

          Activity

            People

              gerald Gerald Sangudi (Inactive)
              prasanna.gholap Prasanna Gholap [X] (Inactive)
              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