Courseiva
Working with DatahardMultiple SelectObjective-mapped

SNOW-CAD Working with Data Practice Question

Which TWO of the following are valid ways to reduce the number of database queries when processing multiple records in a script?

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 dot-walking to access related table fields.

The valid ways to reduce database queries when processing multiple records are A and C. Dot-walking (A) follows relationships without separate queries. GlideAggregate (C) performs aggregation server-side, reducing round trips. Option E is incorrect because using GlideRecord's get() method with a sys_id still executes a separate database query for each call, so it does not reduce queries. Options B and D increase queries: B uses multiple queries, and D uses getValue() which does not reduce queries since it accesses a field from an already retrieved record.

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 dot-walking to access related table fields.

    Why this is correct

    Correct. Dot-walking traverses related table fields without additional queries, reducing database calls.

  • Use multiple GlideRecord queries for each record.

    Why it's wrong here

    Incorrect. Using multiple GlideRecord queries for each record increases database queries.

  • Use GlideAggregate for aggregation instead of iterating.

    Why this is correct

    Correct. GlideAggregate performs aggregation on the server side, reducing round trips.

  • Use getValue() to retrieve field values individually.

    Why it's wrong here

    Incorrect. Using getValue() retrieves a field from an already loaded record but does not reduce the number of queries.

  • Use GlideRecord's get() method with a sys_id set.

    Why it's wrong here

    Incorrect. Each call to GlideRecord's get() method executes a separate database query, so it does not reduce queries.

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.