Database indexing

Indexing is one of the most important database features and must be implemented properly where needed to improve response time. Just like in other database-based applications, creating an index must be dealt with carefully, and only the fields that will be looked up often must be indexed. Indexing will not just improve the response time; it also greatly improves the database performance and can help optimize slow queries:

  1. In the ServiceNow platform, to create a database index, we can use the System Definition | Tables module. Let's create an index for the Caller field in the Booking Request table.
  2. In the System Definition | Tables module, open the Booking Request table by clicking on the info icon next to the record:
  1. It will bring you up to the details page of the Booking Request table's configuration. Navigate to the bottom of the page and click on the New button in the Database Indexes related list, as shown in the following screenshot:
  1. Clicking on the New button in the Database Indexes related list will open a modal window, as shown in the following screenshot.

 

  1. Bring in the Caller fields from the available list to the selected list, and click on the Create Index button:

We can select multiple fields to index; however, we must be careful when selecting multiple fields as the order in which we select the fields can hamper the index performance.

The platform will usually generate the index in the background within a minute or two and prompt you to specify an email address to receive status notifications upon completion of the indexing process. An index can take anywhere between a minute to about an hour to generate depending upon the number of records that need to be indexed. Now that we have learned how to index a column in the ServiceNow platform, let us look at how to enable full-text indexing on a table.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.131.110.169