Improving the responsiveness of Lifecycle Query Engine queries

When the query activity is high, the load on the server can affect the responsiveness of the queries. As an administrator, you can take several measures to improve the resiliency of Lifecycle Query Engine and the responsiveness of queries by defining properties on the Query Service page. For example, you can define limits for running queries, enable query caching, enable load shedding, or block long-running queries.

About this task

To configure the query service, click the Edit query service configuration link in the Query Service section, on the LQE home page.
Query Service section on the LQE home page
You can also access this page from the administration area at https://host_name:port/lqe/web/admin/. Click SPARQL service in the Configuration section.

Query configuration

The Lifecycle Query Engine query service runs queries on the indexed data. You can define the properties for the service that apply to all queries that run against the index. By default, the query service is enabled, and the values are applied to all the nodes.

One way that you can manage query performance is to define limits for queries by specifying the following properties:

Screen capture of the Query properties on the Query Service page.

  • Query Result Set Limit: The number of results that are returned to the user for any query. Keeping this value under control reduces the performance impact when users accidentally create queries that return an excessive number of results.
  • Query Timeout: The amount of time in seconds during which LQE is dedicated to retrieving and serving query results.

If LQE is performing intensive work, such as creating an index for a new data source or backing up the data, you might improve performance by temporarily disabling the query service.

Query caching

When you enable query caching, query results are cached in the central database and are shared across all users who belong to the same access groups. Information about the groups that the query touches and the subset of those groups that the user belongs to is stored in the cache with the query results.

LQE provides two types of caching: for HTTP response and for query results. HTTP query caching is complementary to query result caching. When a system is under load, both caching operations can help reduce the load. You can select the type of caching to use and specify how long query results are cached.
Note: If your users want access to the most recent data in the LQE index, do not enable either type of caching.
Screen capture of the Query Caching properties on the Query Service page.
  • HTTP Response Caching Enabled: Query results are cached on the client.
  • HTTP Response Max Age (seconds): The amount of time in seconds that cached query results are available on the client. The default is 120.
  • Query Result Caching Enabled: Query results are cached on the server.
  • Query Result Cache Expiration (seconds): The amount of time in seconds that cached query results are available on the server. The default is 120.

How it works: Two users, A and B, are in the same resource group. User A runs a query. If user B runs the same query within 120 seconds, cached query results are shown. If user B runs the same query after 120 seconds, the query runs again and updated results are displayed. If you enable query load shedding, this behavior changes when the warning and critical thresholds are reached.

Query load shedding

By defining query load shedding threshold values, you can control how Lifecycle Query Engine behaves when the query load is heavy and the thresholds are reached.

Screen capture of the Load Shedding properties on the Query Service page.

When load shedding is disabled, query results are cached and expire based on the Query result cache expiration value. However, when load shedding is enabled, LQE has three operating conditions:
  • Normal: The query runs and the results are cached for 120 seconds (or the Query result cache expiration value). If a user with the same permissions runs the same query within 120 seconds, the cached results are returned, otherwise the query runs and the results are cached for 120 seconds. Normal operating conditions apply whether load shedding is enabled or disabled.
  • Warning: If the queries historically run in less time than the Max time of a fast query value, the query runs and the results are cached. Otherwise, cached results are returned - even if they have expired.
  • Critical: When the critical threshold values are reached, queries no longer run and you see only the cached results.
Note: The threshold values that you define on the SPARQL Service page apply to all nodes. You can specify threshold values for individual nodes on the LQE Nodes page. See Managing Lifecycle Query Engine nodes.
Tip: You can monitor the performance of Lifecycle Query Engine on the Home page, or on the Health Monitoring page. You can also configure LQE to notify you when the thresholds are exceeded.

Blocking queries

While monitoring the performance of queries, you might notice that a query is taking a long time to run. You can block that query from running in the future.


  1. On the Lifecycle Query Engine Health Monitoring page navigation, click Queries.
  2. Click the tabs to see the list of completed or running queries, or to check what queries are blocked.
  3. To block a running query, in the Actions column, click Block. The query will be listed on the Blocked Queries page. You can unblock a query in the list by clicking the Unblock action.