Optimization of Queries with long runtime

How to use file Query outputs for quick responses

This feature is a solution for queries that have a high runtime and do not constantly have to provide current data. Therefore it is possible to search in the file instead of executing the query again.

How to create a solution:

  1. Create a new Query
    1. Page 1 - Select Query Type
      • Select File of entries
    2. Page 2 - Query Properties
      • Assign Display name
      • Set appropriate Tags
      • Properties: Activate the options
        • Real-time query without caching
        • ...with automatic query execution
    3. Page 3 - File Properties
      • Assign Base name of the file containing the selectable entries
      • Select Display part: the lines also contain a display part, separated by a separator; select ; as seperator
  2. Create a new Action
    1. Page 1 - Select a Script
      • Choose a Query-Script
    2. Page 6 - Set Result Options & Notifications
      • Activate the option Store Script result strings for parameter value selection and select the created Query.
    3. Run the created Action
    4. Notes: 
      • It is recommended to execute the Action continuously (scheduled) during a little operating time.
      • The results from $SRXEnv.Resultlist and $SRXEnv.Resultlist2 are stored in the configured file.
      • The file is located under C:\ProgramData\ScriptRunner\Service\Settings\Params on the ScriptRunner server and is overwritten each time the Action runs.
  3. Create another Action
    1. Page 5 - Assign Parameter Values
      • Select the generated File Query for a parameter
    2. When you run the Action, the entries from the text file are displayed