Set execution mode for running a query
Configure the execution mode to use when running a saved query. The execution mode setting determines whether the query runs using a performance-enhancing engine or the legacy engine.
Avant de commencer
Role required: cmdb_query_builder
Pourquoi et quand exécuter cette tâche
A saved query can run in either of the following execution modes:
- V1: Runs the query using the legacy SQL-based query execution engine.
- V2: Runs the query using an enhanced query execution engine based on Graph API technology, which is designed for improved performance and scalability.
Remarque :
When running queries that contain OR nodes, the format of the returned results is different between the
options.
The system uses query-level engine execution mode settings and system-wide properties to determine which mode to use. A query-level setting has precedence over system property settings in the decision of which engine to use
to run a saved query:
- Check the query setting in the Query Execution Mode attribute in the Saved Queries [qb_saved_query] table:
- If 'v1' or 'v2': Use the specified value.
- If 'None': Check system properties as described in the next step.
- Check system property glide.cmdb.query.execution_mode:
- If 'v1', null, or empty: Use v1
-
If 'v2': Perform 'OR'-specific evaluation:
If the query contains one or more logical OR conditions:- Check the value of glide.cmdb.query.or_execution_mode:
- If 'v1' or 'v2': Use that value
- If empty: Use v1
- If the query contains no OR conditions: Use v2
- Check the value of glide.cmdb.query.or_execution_mode:
Procédure
- Navigate to All and then, in the navigation filter, enter qb_saved_query.list to open the Saved Queries table.
- In the Saved Queries list view, select the query for which you want to set execution mode.
- On the query's form, set Query Execution Mode to 'v1' or 'v2'.
- Select Update.