How to fix it
- Navigate to
System Diagnostics > Stats > Slow Queriesto identify the most expensive database queries running on your instance. - Check
System Definition > Business Rulesand filter byUpdatedfield for rules modified in the last 30 days. - Open each recent Business Rule and search for
whileloops containingGlideRecordqueries. This is the most common cause of performance issues. - For any problematic Business Rules, either optimize the query with
addEncodedQuery()or move the logic outside the loop. Consider usingsetLimit()to prevent runaway queries. - Navigate to
System Diagnostics > Stats > Table Statsand identify tables with high record counts (>100k) that appear in your slow queries. - Go to
System Definition > Tablesand open the problematic table. Click the Database Indexes related list to review existing indexes. - Create new indexes for frequently queried fields by clicking New in the Database Indexes section. Focus on fields used in WHERE clauses of your slow queries.
Index creation can take several hours on large tables and may impact performance during creation. Schedule during maintenance windows.
- Check
System Definition > Client Scriptsfor onChange scripts. Open browser Developer Tools and monitor Network tab while loading forms to identify excessive AJAX calls. - Optimize Client Scripts by adding conditions to prevent unnecessary GlideAjax calls, or consolidate multiple calls into a single Script Include method.
- Navigate to
System Scheduler > Scheduled Jobsand review jobs scheduled between 8 AM and 6 PM. Move resource-intensive jobs to off-peak hours. - Review recent update sets in
System Update Sets > Retrieved Update Setsfor any new code that may contain inefficient queries or missing encoded query parameters.
Monitor System Diagnostics > Stats > Slow Queries daily after implementing fixes to verify performance improvements and catch new issues early.