Uploaded image for project: 'Couchbase Mobile'
  1. Couchbase Mobile
  2. CM-340

[java][query] test_query_inner_join performs very slow on cbl side

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Not a Bug
    • Minor
    • None
    • Mercury
    • CouchbaseLite

    Description

      • CBL / SG Version: couchbase-lite-java 2.7.0-91
      • Steps to Reproduce:
        1. form a query:

        "LIMIT":10,"FROM":[{"AS":"route"},{"AS":"airline","JOIN":"INNER","ON":["AND",["AND",["=",[".airline.icao"],[".route.destinationairport"]],["=",[".airline.country"],"United States"]],["=",[".route.stops"],0]]}],"WHAT":[[".route.airline"],[".route.sourceairport"],[".airline.country"]]

        2. execute the query using cbl library on java desktop or webservice with centos 6 or 7 platform}}

      Summary -

      Often Query Test job on jenkins fails either for Java Desktop or Java WebService. I found this test_query_inner_join takes much longer than other query. I understand travel-sample database is large, but it maybe worth for dev can take a look its performance.

      /CouchbaseLite/QUERY:

      {Query#191} Compiling JSON query: {"LIMIT":10,"FROM":[{"AS":"route"},{"AS":"airline","JOIN":"INNER","ON":["AND",["AND",["=",[".airline.icao"],[".route.destinationairport"]],["=",[".airline.country"],"United States"]],["=",[".route.stops"],0]]}],"WHAT":[[".route.airline"],[".route.sourceairport"],[".airline.country"]]}
      I/CouchbaseLite/QUERY:{Query#191}

      Compiled as SELECT fl_result(fl_value("route".body, 'airline')), fl_result(fl_value("route".body, 'sourceairport')), fl_result(fl_value("airline".body, 'country')) FROM kv_default AS "route" INNER JOIN kv_default AS "airline" ON ((fl_value("airline".body, 'icao') = fl_value("route".body, 'destinationairport') AND fl_value("airline".body, 'country') = 'United States') AND fl_value("route".body, 'stops') = 0) AND ("airline".flags & 1 = 0) WHERE ("route".flags & 1 = 0) LIMIT MAX(0, 10)
      I/CouchbaseLite/QUERY:

      {QueryEnum#192}==> litecore::SQLiteQueryEnumerator 0x7f4a40be8aa8 @0x7f4a40be8aa8
      I/CouchbaseLite/QUERY:{QueryEnum#192}

      Created on

      {Query#191}

      with 10 rows (206 bytes) in 341114.475ms

      Attachments

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

        Activity

          People

            eunice.huang Eunice Huang (Inactive)
            eunice.huang Eunice Huang (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