Best Practices

The following are some guidelines and recommendations that can help you optimize connector performance.

Design Queries That Retrieves a Specific Set of Columns

Most tables in the ServiceNow schema contain a large number of columns. Performing a SELECT * on those tables slows the connector performance as it must parse all the column values for each row returned from the server. Therefore, it is faster to read only a subset of columns using the SELECT clause.

When possible, use WHERE clauses to filter on specific columns, or use the Top N command to limit the number of records that the query applies to.

Use One Session for Multiple Queries

When you run multiple queries, first establish a connection to the instance. Then, reuse this connection for all queries. Otherwise, the connector creates a new connection for each query.

For example, if you use a FOR loop to iterate through multiple queries, establish the connection outside of the FOR loop. Then, perform each query within the FOR loop using the established connection.

Exclude Unused Schemas

Each ServiceNow database table is exposed through two schemas: Actual and Display. For information about these schemas, see Schema Support.

If you need to query data from only one of these schemas, then specify the schema name in your query statement. Excluding an unused schema from your query can shorten BI tool initialization times and also boost connector performance by shortening the body of each response.