Database indexing is used to speed up data retrieval when querying for records from database tables. Enabling the Share Index option allows you to share the indexes of a table in ServiceNow through a bulk share so the same indexes can be created in the database where you've shared data to.
With this option enabled, the bulk share shares out an index message that contains the columns that are indexed in the table as its configured in ServiceNow. The DataSync Agent will then pick up this message and create indexes on the columns of the database table to match.
NOTE: Indexing database tables is compatible with Oracle, SQL Server, MySQL, and Postgres databases, and is only used for DataSync. Snowflake does not support indexing, therefore, this feature is not compatible for Snowflake.
Some databases, such as SQL Server and Oracle, do not support the creation of indexes on columns that are of large object (LOB) data types. To learn more about CLOB columns in DataSync Agent configurations, see CLOB Configuration for DataSync Agent.
Procedure
To share indexed tables from ServiceNow to a database through the DataSync Agent, follow these steps:
Create a table index
Log into your ServiceNow instance. Then, follow the steps in this link on creating table indexes.
Navigate to Bulk Share
In ServiceNow's left side navigation window, navigate to Perspectium > DataSync > Bulk Share or simply type and then click on Bulk Share. Then, click New to create a new bulk share.
Access advance options
Check Advanced. Once that option is checked, an Advanced tab will appear with the rest of the selection tabs.
Enable Share Index.
Check Share Index. Then, follow the rest of the steps in Create a ServiceNow bulk share.
Click the Save button at the bottom of the form to save the configurations for your bulk share. Once your bulk share configurations have been saved, you can click back into the bulk share record and click the Execute Now button at the bottom of the form to bulk share out the specified records immediately.
Upon execution of the bulk share, you should see that an index message has been shared out in addition to the other records.
An index message will be shared out for each table shared by the bulk share. The index message will contain all the ServiceNow indexes for the table in the message's value field. Once the index message is received by the DataSync Agent, it will create indexes on the columns of the database table.
NOTE:
- The index message will only be shared out once per bulk share.
- In order to re-share the index message, you will need to clone the bulk share by clicking on the option under Related Links and click Clone bulk share. Doing so will copy the current bulk share configuration, including the Share Index option activated.