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

Query with multiple joins executes for 20+ minutes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.5.0
    • 5.5.0
    • query
    • None
    • Untriaged
    • Unknown

    Description

      Not sure if this is a bug, but some of the ansi join rqg queries are taking 20+ minutes to finish executing if they finish at all. To repro, run the following tests:

      ./testrunner -i /Users/korrigan.clark/Desktop/resources/rqg-local.ini -p gsi_type=plasma -t rqg.test_rqg.RQGTests.test_rqg_concurrent,test_file_path=b/resources/rqg/multiple_table_db/query_test_using_templates/queries_ansi_joins_1000.txt.zip,database=multiple_table_db,reset_database=True,concurreny_count=10,index_quota_percent=85,record_failure=False,password=password,use_mysql=True,replicas=0,total_queries=10,failure_record_path=/tmp,skip_cleanup=true,subquery=False,ansi_joins=True,create_secondary_indexes=True,create_secondary_meta_indexes=True,create_secondary_ansi_join_indexes=True

       

      Just use a 1 node ini. This command will run only 10 queries. The first query that gets run in the culprit:

      SELECT  t_2.*  FROM  multiple_table_db_84873946_simple_table_3 t_5  INNER JOIN  multiple_table_db_84873946_simple_table_2 t_1 ON ( (t_5.char_field1 = t_1.char_field1 AND t_5.int_field1 < t_1.int_field1) )      LEFT JOIN  multiple_table_db_84873946_simple_table_1 t_3 ON ( (t_5.decimal_field1 = t_3.decimal_field1 AND t_5.varchar_field1 = t_3.varchar_field1) )      LEFT JOIN  multiple_table_db_84873946_simple_table_4 t_2 ON ( (t_3.int_field1 = t_2.int_field1 AND t_3.varchar_field1 = t_2.varchar_field1 AND t_3.int_field1 = t_2.int_field1) )      LEFT JOIN  multiple_table_db_84873946_simple_table_10 t_4 ON ( NOT ((t_5.decimal_field1 = t_4.decimal_field1 AND t_5.varchar_field1 = t_4.varchar_field1 AND t_5.varchar_field1 = t_4.varchar_field1)) )      INNER JOIN  multiple_table_db_84873946_simple_table_4 t_2JWzwoYaSrR ON ( (t_3.primary_key_id = t_2JWzwoYaSrR.primary_key_id AND NOT (NOT (t_3.int_field1 = t_2JWzwoYaSrR.int_field1))) )      LEFT JOIN  multiple_table_db_84873946_simple_table_4 t_2hAuEmuNSgG ON ( (t_5.int_field1 = t_2hAuEmuNSgG.int_field1 AND t_5.int_field1 = t_2hAuEmuNSgG.int_field1) )      WHERE  (t_4.bool_field1 != true OR t_2.primary_key_id <= "549")    ORDER BY   t_3.int_field1 , t_3.decimal_field1

       

       

      Attachments

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

        Activity

          People

            korrigan.clark Korrigan Clark (Inactive)
            korrigan.clark Korrigan Clark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty