Regarding Performance for Glide Record

VishaalRanS
Tera Guru

Hello Everyone,

 

I would like to know how exactly do developers troubleshoot performance issues related to Glide Record queries in ServiceNow? Is there any tools and techniques used?

4 ACCEPTED SOLUTIONS

brahmandlapally
Mega Guru

I would suggest you to follow the best practices in scripts And avoid DOM manipulations in client side. Give proper Name to it without duplicates

View solution in original post

Anantha27
Mega Guru

Hi @VishaalRanS 

To troubleshoot GlideRecord performance issues in ServiceNow, developers use:

  1. SQL Debugging (System Diagnostics > SQL) to analyze slow queries.
  2. Script Execution Tracker to track script execution times.
  3. Slow Query Logs for identifying problematic queries.
  4. Query Optimization: Use indexed fields, limit results, avoid unnecessary .next() or .updateMultiple().
  5. Database Indexing: Ensure proper indexing for frequently queried fields.
  6. Debug SQL Sessions to log SQL activity during testing.

These techniques help identify and optimize slow GlideRecord queries.

View solution in original post

Sai Krishna6147
Mega Guru

Hi @VishaalRanS 

When developers troubleshoot performance issues related to GlideRecord queries in ServiceNow, they focus on identifying inefficient queries that may cause slow response times or increased server load. Here are the tools and techniques commonly used:

Debugging Tools in ServiceNow

Techniques for Optimizing GlideRecord Queries

System Log and Transaction Log

Performance Analytics and Metrics

Review Query Execution Plan

Best Practices:

1.Use cache wisely: In cases where similar queries are repeatedly run, caching the results might reduce query execution time.

2.Avoid large datasets: Where possible, divide large datasets or use pagination to limit the load on the database.

3.Scheduled Jobs: Run heavy or complex queries during off-peak times using Scheduled Jobs to avoid impacting real-time performance.

These tools and techniques, when used appropriately, help ensure that GlideRecord queries are optimized and do not become a bottleneck in the system.

 

 

View solution in original post

Ramesh_143
Giga Guru

Hi  @VishaalRanS ,

To troubleshoot GlideRecord query performance issues in ServiceNow, developers can use the following tools and techniques:

Tools:

  1. Debug SQL: Identifies inefficient SQL queries.
  2. Slow Query Logs: Tracks long-running queries.
  3. Debug Business Rule: Shows how business rules impact query performance.
  4. Execution Plan & Script Debugger: Profiles query execution and script performance.

Optimization Techniques:

  1. Index Fields: Ensure frequently queried fields are indexed.
  2. Limit Query Results: Use conditions and setLimit() to reduce dataset size.
  3. Efficient Conditions: Use specific addQuery() filters and avoid complex operations.
  4. GlideAggregate: Use for aggregate operations instead of looping over records.

These tools and techniques help identify bottlenecks and improve the performance of GlideRecord queries.

Thanks & Regards,

Ramesh

Please mark this response as correct or helpful if it assisted you with your question.

 

View solution in original post

4 REPLIES 4

brahmandlapally
Mega Guru

I would suggest you to follow the best practices in scripts And avoid DOM manipulations in client side. Give proper Name to it without duplicates

Anantha27
Mega Guru

Hi @VishaalRanS 

To troubleshoot GlideRecord performance issues in ServiceNow, developers use:

  1. SQL Debugging (System Diagnostics > SQL) to analyze slow queries.
  2. Script Execution Tracker to track script execution times.
  3. Slow Query Logs for identifying problematic queries.
  4. Query Optimization: Use indexed fields, limit results, avoid unnecessary .next() or .updateMultiple().
  5. Database Indexing: Ensure proper indexing for frequently queried fields.
  6. Debug SQL Sessions to log SQL activity during testing.

These techniques help identify and optimize slow GlideRecord queries.

Sai Krishna6147
Mega Guru

Hi @VishaalRanS 

When developers troubleshoot performance issues related to GlideRecord queries in ServiceNow, they focus on identifying inefficient queries that may cause slow response times or increased server load. Here are the tools and techniques commonly used:

Debugging Tools in ServiceNow

Techniques for Optimizing GlideRecord Queries

System Log and Transaction Log

Performance Analytics and Metrics

Review Query Execution Plan

Best Practices:

1.Use cache wisely: In cases where similar queries are repeatedly run, caching the results might reduce query execution time.

2.Avoid large datasets: Where possible, divide large datasets or use pagination to limit the load on the database.

3.Scheduled Jobs: Run heavy or complex queries during off-peak times using Scheduled Jobs to avoid impacting real-time performance.

These tools and techniques, when used appropriately, help ensure that GlideRecord queries are optimized and do not become a bottleneck in the system.

 

 

Ramesh_143
Giga Guru

Hi  @VishaalRanS ,

To troubleshoot GlideRecord query performance issues in ServiceNow, developers can use the following tools and techniques:

Tools:

  1. Debug SQL: Identifies inefficient SQL queries.
  2. Slow Query Logs: Tracks long-running queries.
  3. Debug Business Rule: Shows how business rules impact query performance.
  4. Execution Plan & Script Debugger: Profiles query execution and script performance.

Optimization Techniques:

  1. Index Fields: Ensure frequently queried fields are indexed.
  2. Limit Query Results: Use conditions and setLimit() to reduce dataset size.
  3. Efficient Conditions: Use specific addQuery() filters and avoid complex operations.
  4. GlideAggregate: Use for aggregate operations instead of looping over records.

These tools and techniques help identify bottlenecks and improve the performance of GlideRecord queries.

Thanks & Regards,

Ramesh

Please mark this response as correct or helpful if it assisted you with your question.