Notifications

103 views

Description

In an instance with a lot of text searches, the TS Index Stats job takes a long time to run. The majority of the time is spent in getting the number of queries made to an index over a specified period of days. There is no major impact to the instance because this runs as a scheduled job, but it does cause unnecessary database load and causes the job to take longer than necessary.

Steps to Reproduce

Performance issues occur only on instances with a lot of users generating text searches.

  1. In an instance where a lot of text searches have been executed, navigate to /sys.scripts.do.

  2. Run the following code:

    gs.trace(true);
    new GlideTSIndexStatistician().allStats();
    gs.trace(false);
  3. Make note of the slow queries.

  4. Navigate to the following URL:
    /sys_query_pattern_list.do?sysparm_query=stack_traceLIKETSIndexStatistician.getQueries

  5. Make note of the slow queries.

    Note that there is no index OOB and the TS Index Stats job runs a long time.

 

Workaround

Create a supporting (non-unique) index on the Text Searches [text_search] table, on the Created [sys_created_on], and on Table [table] fields. For more detailed instructions, see the documentation topic Create a table index.

 


Related Problem: PRB1272388

Seen In

Kingston

Intended Fix Version

Madrid

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-07-26 11:41:36
Published:2018-07-26