Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.9.0, 5.8.2
    • Fix Version/s: 6.6.0
    • Component/s: None
    • Labels:
      None

      Description

      When running a Property Search using either REST API or AQL, when connected to MSSQL, a query similar to the following is issued:

      2018-01-08 14:29:42,388 [http-nio-8081-exec-3] [DEBUG] (o.a.s.d.u.JdbcHelper:255) - Executing SQL: 'Select bb.* from (Select aa.*  ,ROW_NUMBER() OVER ( order by (SELECT 1)) AS RN  from ( select distinct  n.repo as itemRepo,n.node_path as itemPath,n.node_name as itemName,n.created as itemCreated,n.modified as itemModified,n.updated as itemUpdated,n.created_by as itemCreatedBy,n.modified_by as itemModifiedBy,n.node_type as itemType,n.bin_length as itemSize,n.node_id as itemId,n.depth as itemDepth,n.sha1_actual as itemActualSha1,n.sha1_original as itemOriginalSha1,n.md5_actual as itemActualMd5,n.md5_original as itemOriginalMd5 from  nodes n left outer join node_props np100 on np100.node_id = n.node_id where (((( np100.prop_key = 'liza' and np100.prop_value = 'ariel')))) and(n.repo != 'auto-trashcan' or n.repo is null)  ) aa ) bb Where bb.RN >= 1 AND bb.RN < 9223372036854775807 '.
      

      The following part:

      Select bb.* from (Select aa.*  ,ROW_NUMBER() OVER ( order by (SELECT 1)) AS RN  from (
      

      is redundant, as something like this should be added only if the query is limited.

      The issue, is that currently this runs with a limit of 'long.MAX_VALUE', which does nothing and only harm in performance.

        Attachments

          Activity

            People

            • Assignee:
              liorg Lior Gur (Inactive)
              Reporter:
              arielk Ariel Kabov
              Assigned QA:
              Maria Pogozelits
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: