Courseiva
Core Application DevelopmenthardMultiple ChoiceObjective-mapped

SNOW-CAD Core Application Development Practice Question

A developer is optimizing a Business Rule that runs on every update to the 'incident' table. The rule uses GlideAggregate to count related records. The developer notices performance degradation. Which change will most improve performance while maintaining functionality?

⚠ Common exam trap

ServiceNow often tests the misconception that adding an index (Option B) is the universal performance fix, but the trap here is that reducing unnecessary execution (Option C) is a more impactful optimization than improving query speed for a query that runs too often.

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

Add a condition to the Business Rule such as 'current.changesField('state')' to only run the aggregate when relevant.

It prevents the GlideAggregate from executing on every update, instead running only when the 'state' field changes. This reduces unnecessary database operations, directly addressing the performance degradation while preserving the rule's functionality when needed.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Replace GlideAggregate with GlideRecord and count results manually.

    Why it's wrong here

    GlideRecord would be slower than GlideAggregate for counting.

  • Add a database index on the foreign key field used in the aggregate.

    Why it's wrong here

    Indexing helps but is not a script change; the question asks for a change to the script.

  • Add a condition to the Business Rule such as 'current.changesField('state')' to only run the aggregate when relevant.

    Why this is correct

    Limiting execution to only when the 'state' field changes reduces unnecessary processing.

  • Use the gs.addInfoMessage() to log the count and disable the script in production.

    Why it's wrong here

    Logging does not reduce processing; disabling would break functionality.

About these practice questions

Courseiva writes every SNOW-CAD question from scratch — 481 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.