SPLK-1002 Macros, Saved Searches and CIM Practice Question
A performance analyst notices that a saved search running a macro with multiple `| eval` statements takes significantly longer than expected. The macro includes conditions like `| eval status=if(success=="true", "OK", "Fail")`. Which change would most likely improve performance?
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
✓
Replace the `| eval` with a lookup table that maps the conditions.
The performance issue stems from the conditional `| eval` statements that must be evaluated on every event, consuming CPU cycles. Replacing the `eval` with a lookup table precomputes the status mapping, offloading computation from search time and improving performance. Therefore, option C is correct. Option A (reducing arguments) does not affect the complexity of the eval expressions. Option B (increasing summary index range) is not relevant to the eval overhead. Option D (adding more fields commands) would add extra processing, not reduce it.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Reduce the number of arguments passed to the macro.
Why it's wrong here
Arguments do not affect eval performance directly.
- ✗
Increase the summary index range to reduce the number of events processed.
Why it's wrong here
This changes the data scope, not the search efficiency.
- ✓
Replace the `| eval` with a lookup table that maps the conditions.
Why this is correct
Lookups are faster than per-event eval evaluations.
- ✗
Add more `| fields` commands to limit output fields.
Why it's wrong here
This might help slightly but not as much as avoiding eval.
Go deeper
Related to this question
About these practice questions
One of 475 original SPLK-1002 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SPLK-1002 practice question is part of Courseiva's free Splunk 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 SPLK-1002 exam.