ServiceNow Troubleshooting · LessonReviewed by Praveen T, ServiceNow Trainer, 9 yrs · Updated · Published · current release · fixes
ServiceNow Fixing slow queries
Diagnose and speed up slow lists and scripts.
Quick answer
When ServiceNow is slow, start with the query. Read the Slow Query log for the offending statement, make sure the filtered fields are indexed, keep expensive dot-walked and calculated fields out of list views, replace record loops that only count with GlideAggregate, and add setLimit() and pagination to large operations. Most slowness resolves here before anything else.
Slowness usually traces back to the query. Check these.
- Review the Slow Query log for the offending statement.
- Ensure filtered fields are indexed.
- Avoid expensive dot-walking and calculated fields in list views.
- Replace record loops that count with GlideAggregate.
- Add
setLimit()and paginate large operations.
Practise this on your own free instance.