---
sourceDocument: Brazil ServiceNow AI Platform Capabilities
sourceDocumentLink: https://www.servicenow.com/docs/r/servicenow-platform

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil ServiceNow AI Platform Capabilities

ft:clusterId :

    - platcap

bundleId :

    - platcap

workflow :

    - Platform


---

# Execution modes

# CMDB Query Builder engine execution modes {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of CMDB Query Builder engine execution modes

The CMDB Query Builder engine in ServiceNow Brazil release offers two execution modes---V2 (enhanced) and V1 (legacy)---to run configuration management database (CMDB) queries.
By default, the system uses the V2 mode, optimized for performance and scalability, enabling significantly faster execution of complex queries and handling larger result sets without degradation.
However, certain query structures are not supported in V2 and will automatically fall back to V1 execution to ensure successful query processing.
Show full answer Show less  

## Key Features

* **V2 Mode:** Default enhanced engine designed for improved performance and scalability. Supports most queries and merges related results for queries containing 'OR' operators into single result items.
* **V1 Mode:** Legacy engine used either by explicit configuration or automatically for unsupported query structures in V2. Presents 'OR' operator results as separate items, maintaining legacy result formatting.
* **Handling 'OR' Operators:** Queries with 'OR' logical conditions run faster in V2 but produce differently formatted results compared to V1. Customers can control execution mode for such queries using the system property `glide.cmdb.query.orexecutionmode` to maintain compatibility with existing reports.
* **Execution Mode Settings:**
  * **Query-level setting:** The *Query Execution Mode* attribute on saved queries overrides global properties.
  * **Global settings:** System properties `glide.cmdb.query.executionmode` (default engine mode) and `glide.cmdb.query.orexecutionmode` (for queries with 'OR' conditions) govern system-wide defaults.
* **Unsupported Query Structures in V2:** Queries with related list filters, certain configuration item filters without relationships, and specific service mapping queries with related edges or particular service query properties are automatically executed in V1 mode.
* **Automatic Fallback Mechanism:** The system evaluates query-level and global settings, then checks query structure support in V2. If unsupported, it falls back to V1 to ensure query execution reliability while maximizing performance where possible.

## Practical Implications for ServiceNow Customers

ServiceNow customers can expect improved query performance and scalability by using the default V2 execution mode for most CMDB Query Builder queries. For queries containing complex 'OR' operators or unsupported structures, the platform intelligently switches to V1 mode to preserve result integrity and compatibility with legacy reporting formats.

Administrators can control execution mode preferences at both the individual query level and globally via system properties, enabling tailored performance tuning and consistent query results aligned with organizational needs.

The *Query Execution Mode* attribute in the saved query records and the *Query Execution Mode* column in the Query Status table provide visibility into which engine mode runs each query, assisting in monitoring and troubleshooting query performance.  
The CMDB Query Builder engine uses two execution modes to run queries. By default, the system is configured to use the enhanced mode V2 which is designed for performance optimization. V2 is supported for most queries and
enables running complex queries significantly quicker and process larger result sets without performance degradation.  
The CMDB Query Builder can be set with the following engine execution modes for running queries:

V2

:   An enhanced query execution engine designed for improved performance and scalability. This is the default execution engine. In V2 mode, compared to V1 mode, the CMDB Query Builder engine is capable of running complex queries
    significantly quicker and process larger result sets without performance degradation.

    However, some query structures aren't supported for the V2 mode, in which case such queries will automatically run using the legacy mode (V1).

V1
:   Legacy execution engine which is used when the system is explicitly configured to use V1. This mode is also used even if the system is configured to run in V2 mode, to run queries with a structure that isn't supported for the
    V2 mode.

## Considerations for the 'OR' operator {#query-builder-engine-execution-mode__section_flb_g5m_p3c}

Setting the execution mode for queries that contain 'OR' operators, such as the sample query below, require some special considerations:

Running a query with 'OR' structures can be significantly faster in V2 mode than in V1, but the results are presented differently between V1 and V2 execution modes. The difference is because 'OR' operator nodes generate coalesced
and cross-product result sets. In V2 mode, related results are merged into a single result item. In V1, the same results are represented by separate result items.  
Figure 1. Results for a query with an 'OR' structure, in V1 execution mode  
Figure 2. Results for a query with an 'OR' structure, in V2 execution mode

In some situations, it might be important to run a query with an 'OR' structure, using the V1 engine mode to retain the legacy format of the results in support of existing organizational reports. You can use the
glide.cmdb.query.or_execution_mode system property as described below to control execution mode for queries with 'OR' structures.

## Settings {#query-builder-engine-execution-mode__section_org_d4y_l3c}

The system uses the following settings of execution mode to determine which execution mode to use to run a query:

* Query-level setting:The Query Execution Mode attribute in the Saved Queries \[qb_saved_query\] table sets the engine mode for the respective query. For more information about this setting, see [Set execution mode for running a query](https://www.servicenow.com/docs/~o1xo~mThlZr~5gbvmVqmQ "Configure the execution mode to use when running a query, at the query-level. The execution mode determines whether the query runs using a performance-enhancing engine (V2) or the legacy engine (V1).").

  The query-level setting has precedence over system property settings.
* Global setting:System property glide.cmdb.query.execution_mode sets the system-wide default mode to use when a query's mode isn't set at the query level.

* Global setting:System property glide.cmdb.query.or_execution_mode sets the system-wide default execution engine mode for queries that contain at least one logical OR condition. Because the results of a
  query with an 'OR' structure are formatted differently between V1 and V2 mode, this property setting also affects which format is used for the results.

  This property has precedence over the
  glide.cmdb.query.execution_mode system property.
{#query-builder-engine-execution-mode__ul_nnp_2xf_m3c}

For more information about the engine mode system properties, see [Property settings for CMDB Query Builder](https://www.servicenow.com/docs/EWe6cbQnLqGN~DTOYAM1HQ "Set property values to configure query processing.").

## Unsupported query structures for V2 mode {#query-builder-engine-execution-mode__section_olr_wny_l3c}

The following query structures aren't supported in V2 and therefore are executed using V1 mode even if the system is configured to use V2 mode:

* Queries with filters containing related list conditions.
* No relationships combined with a filter containing configuration item conditions: Node that has no relationships configured and the target node's filter has configuration item conditions.

  For example: `Server NOT connected to Router WHERE Router.status = Active`.
* Service Mapping query with related edges (Applicative flow, Not Applicative flow, Belongs To, Not belongs to). Service Mapping query with service query properties set to Find Related CIs or Find Unrelated CIs, or a combination query in which a service query connection property is set to Does Not Belong to Service.
{#query-builder-engine-execution-mode__ul_zlp_k4y_l3c}

## Decision flow {#query-builder-engine-execution-mode__section_ivj_vny_l3c}

The system uses a decision flow that checks all relevant settings and the query structure to determine which execution mode to use for running a query. First, the system checks the query-level and the system-level settings. Then,
if the settings are configured for using V2 to run a query, the system checks the query structure to determine if the V2 execution mode supports the query's structure. If the query contains a structure that isn't supported in V2,
execution automatically falls back to using V1 mode even though the settings are configured to using V2. This automatic fallback mechanism supports a successful execution of all queries while maximizing performance benefits where
possible.

Using default settings, if a query structure is supported by the V2 execution mode, the query executes using V2 mode.  
The following decision flow examines settings and query structures, to determine whether a query runs in V1 or V2 engine execution mode:

1. Check the setting in the Query Execution Mode attribute in the query record in the Saved Queries \[qb_saved_query\] table:
   * If 'V1': Use V1
   * If 'V2': Skip to step #4 --- Perform V2 support check
   * If 'None': Check system properties as described in the next step
   {#query-builder-engine-execution-mode__ul_ush_yny_l3c}
2. Check system property glide.cmdb.query.execution_mode:
   * If not set: Use V2 pending support check
   * If 'V1': Use V1
   * If 'V2':
     * If no logical OR conditions: Skip to step #4 --- Perform V2 support check
     * If one or more logical OR conditions: Perform 'OR'-specific check as described in the next step
     {#query-builder-engine-execution-mode__ul_xhr_hgg_m3c}
   {#query-builder-engine-execution-mode__ul_vsh_yny_l3c}
3. Check the value of glide.cmdb.query.or_execution_mode:
   * If 'V1': Use V1
   * If 'V2': Skip to step #4 --- Perform V2 support check
   * If empty: Use V2
   {#query-builder-engine-execution-mode__ul_xsh_yny_l3c}
4. Perform V2 support check:
   * If the query contains a structure that isn't supported in V2: Use V1
   * If query structure is supported in V2: Use V2
   {#query-builder-engine-execution-mode__ul_kpd_pgg_m3c}
{#query-builder-engine-execution-mode__ol_tsh_yny_l3c}

The Query Execution Mode attribute in table Query Status \[qb_query_status\] shows the execution mode assigned to each query.

