How to Efficiently Bulk Update Records in ServiceNow
A developer has a GlideRecord query that retrieves 10,000 records. They need to perform an update on each record. Which approach is most efficient to avoid performance issues?
Quick Answer
The reason this pairing is the most efficient approach is that it directly targets the two biggest sources of overhead in a large bulk update: setWorkflow(false) stops business rules, workflows, and other automated processes from firing on each of the 10,000 updates, and setAutoSysFields(false) skips the automatic recalculation of system fields like sys_updated_by and sys_updated_on on every write. Together these avoid a huge amount of unnecessary processing that would otherwise run once per record, which matters enormously at this scale since even small per-record overhead multiplies into a significant performance hit across 10,000 iterations. The other approaches in this scenario each fail to actually solve the problem: relying on GlideRecord alone without these settings still lets business rules execute on every update, splitting the work into multiple separate queries only adds more database round trips rather than reducing them, and applying a limit like 100 would cut off most of the records entirely rather than processing the full set efficiently. The general lesson here is that when a question describes needing to update or process a large number of records efficiently, the answer usually involves explicitly turning off automatic platform behaviors that are not needed for the task, such as workflow execution or system field updates, rather than trying to restructure the query or reduce the record count.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use setWorkflow(false) and setAutoSysFields(false) before updating each record.
Using `setWorkflow(false)` disables business rules and `setAutoSysFields(false)` prevents automatic updates of system fields (like `sys_updated_by` and `sys_updated_on`), significantly reducing database write overhead and improving performance when updating many records. Option A is wrong because GlideRecord's batch mode alone does not disable workflows or system fields; business rules still execute. Option C is wrong because using multiple queries increases the number of database operations and overall load. Option D is wrong because `setLimit(100)` restricts the query to only 100 records, so updates would miss the remaining 9,900 records.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use GlideRecord's batch mode without any modifications.
Why it's wrong here
Batch mode still runs business rules unless disabled.
- ✓
Use setWorkflow(false) and setAutoSysFields(false) before updating each record.
Why this is correct
Disabling workflow and auto sys fields reduces overhead.
- ✗
Use multiple GlideRecord queries to process records in batches.
Why it's wrong here
Multiple queries can increase database load.
- ✗
Use setLimit(100) and run the script multiple times.
Why it's wrong here
Limiting the query may not update all records.
Go deeper
Related to this question
About these practice questions
This SNOW-CAD question is part of Courseiva's 481-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SNOW-CAD
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer needs to update a large number of records in the 'incident' table based on a specific condition. Which approach should be used to minimize performance impact?
easy- ✓ A.Use GlideRecord with setWorkflow(false) and setEngine(false) to update records in a loop.
- B.Use GlideAggregate to perform the update.
- C.Use an export set to update records in bulk.
- D.Use the updateMultiple method on a GlideRecord object.
Why A: A is correct because using GlideRecord with setWorkflow(false) and setEngine(false) prevents unnecessary business rules and workflow execution, reducing performance impact. B is incorrect because GlideAggregate is used for aggregation and statistics, not for updating records. C is incorrect because an export set is designed for data export/import, not for bulk updates within the platform. D is incorrect because updateMultiple does perform bulk updates but still triggers business rules if not disabled, and it does not provide the same level of control as GlideRecord with disabled workflows.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SNOW-CAD practice question is part of Courseiva's free ServiceNow certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SNOW-CAD exam.