Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-10872

Improve testTestExecutions query

    XporterXMLWordPrintable

Details

    Description

      While running the JQL testTestExecutions the below SQL will be triggered

      SELECT DISTINCT TEST_EXEC_TABLE_ALIAS."id" AS testExecId FROM public."AO_8B1069_TEST_RUN" AS TEST_RUN_TABLE_ALIAS JOIN public."jiraissue" AS TEST_EXEC_TABLE_ALIAS ON TEST_RUN_TABLE_ALIAS."TEST_EXEC_ISSUE" = TEST_EXEC_TABLE_ALIAS."id" JOIN public."jiraissue" AS TEST_TABLE_ALIAS ON TEST_RUN_TABLE_ALIAS."TEST_ISSUE_ID" = TEST_TABLE_ALIAS."id" WHERE (TEST_TABLE_ALIAS."id" IN ) AND (TEST_RUN_TABLE_ALIAS."STATUS" IN ) ORDER BY TEST_EXEC_TABLE_ALIAS."id" DESC OFFSET ? ROWS FETCH NEXT ? ROWS ONLY
      

      We are doing 2 inner joins between test run and jira issue table in order to filter out invalid references on issue objects that may no longer exist in the environment.

      Doing so might no be ideal, or even necessary in some contexts. Review if we can make the query lighter by removing the inner joins.

      Attachments

        Activity

          People

            dmdu David Duarte
            dmdu David Duarte
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours, 30 minutes
                7h 30m