Reducing Memory Usage in Transaction with fields Option
A transaction search that uses a large maxspan and high-cardinality fields is failing due to memory limitations. Which approach can best reduce memory usage without changing the transaction logic?
Quick Answer
The memory problem in a large, high-cardinality transaction search comes from how much data transaction has to hold onto for every event while it waits for a transaction's boundary to close: every field on every event sits in memory until that event's group is finalized. Since transaction itself still needs to run, and the grouping logic, maxspan and the cardinality of the correlating fields, isn't changing, the effective lever left is reducing how much data each event carries into that memory-intensive stage in the first place. The fields command applied before transaction strips each event down to only the fields actually needed, the correlation field(s) and _time, so transaction is buffering a much smaller payload per event even though it's still holding just as many events in memory during the same window. This directly shrinks memory usage without touching the transaction logic itself, unlike alternatives that either change the underlying approach, like switching to stats, which alters event-boundary behavior, or don't actually reduce memory, like increasing maxpause, which can enlarge the window of open transactions, or keeping evicted events, which keeps more data resident rather than less. The general takeaway is that when a scenario asks you to reduce a transaction's memory footprint without changing its underlying logic, the fields command trimming unnecessary fields before the memory-intensive stage is the pattern to reach for.
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 the 'fields' command before transaction to retain only the correlation fields and _time.
Using the 'fields' command before 'transaction' to retain only the correlation fields and _time reduces the amount of data held in memory for each event, directly addressing memory limitations. Option A (using 'stats' with values()) changes the logic and does not preserve the event boundary behavior of transaction. Option C (increasing maxpause) does not reduce memory; it may increase the number of concurrent open transactions. Option D (setting keepevicted=true) actually increases memory usage by keeping evicted events.
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 the 'stats' command with values() instead of transaction.
Why it's wrong here
Incorrect: this changes the correlation logic.
- ✓
Use the 'fields' command before transaction to retain only the correlation fields and _time.
Why this is correct
Correct: minimizes field count.
- ✗
Increase the maxpause value to reduce number of open transactions.
Why it's wrong here
Incorrect: maxpause does not directly reduce memory per transaction.
- ✗
Set keepevicted=true to offload evicted events.
Why it's wrong here
Incorrect: keepevicted retains more data.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SPLK-1002 question from scratch — 475 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 →
Same concept, more angles
1 more way this is tested on SPLK-1002
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 large transaction command is causing the search to run out of memory. Which approach best reduces memory usage while maintaining the transaction logic?
medium- A.Increase the maxeventtokens setting.
- ✓ B.Use the fields option to include only necessary fields.
- C.Replace transaction with stats to aggregate.
- D.Use timeline to store transactions.
Why B: Using the fields option with the transaction command limits the fields carried in each event, reducing memory usage. Option A (increasing maxeventtokens) would increase memory consumption. Option C (replacing with stats) changes the correlation approach and may not preserve transaction logic. Option D (timeline) is not relevant to memory reduction.
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.