SPLK-1002 practice question 2 of 35

Which of the following statements is true, especially in large environments?

Full set: 297 questions

Domain Macros

Answer options
A: Use the scats command when you next to group events by two or more fields.
B: The stats command is faster and more efficient than the transaction command Correct answer
C: The transaction command is faster and more efficient than the stats command.
D: Use the transaction command when you want to see the results of a calculation.
Correct Answer:
B. The stats command is faster and more efficient than the transaction command
Explanation

The stats command is significantly more performant than the transaction command, a difference that becomes critical in large environments. stats is a streaming command that processes events and computes statistics efficiently, often on the indexers before forwarding results to the search head. In contrast, transaction is a non-streaming command that must collect all relevant events on the search head to group them. This process is memory and CPU-intensive, as it requires holding event data and state, leading to slower execution times and potential performance bottlenecks on the search head, especially with large datasets.

Why Incorrect

A. Use the scats command when you next to group events by two or more fields. This option contains a typo ("scats"). Even if corrected to "stats", while true that stats can group by multiple fields, this is not the most critical distinction from transaction regarding performance.
C. The transaction command is faster and more efficient than the stats command. This is incorrect. The transaction command is well-documented as being resource-intensive and less efficient than stats for most aggregation and correlation tasks.
D. Use the transaction command when you want to see the results of a calculation. The primary command for performing calculations like count, average, sum, etc., is stats. The transaction command's main purpose is to group related events, not perform arbitrary calculations.

References

1. Splunk Enterprise, Search Manual, Version 9.2.1, "Write better searches": In the section "Use the stats command instead of transaction", the documentation states, "The transaction command is useful in some situations, but it is resource-intensive. In many cases, you can use the stats command to get the same or similar results more efficiently."

2. Splunk Enterprise, Search Reference, Version 9.2.1, "transaction": The usage notes for the transaction command highlight its performance characteristics: "The transaction command can be resource-intensive... For better performance, use the stats command whenever possible." It further explains that transaction processing occurs on the search head, unlike stats which can be partially processed on indexers.

3. Splunk Enterprise, Splunk Cloud Platform Admin Manual, Version 9.2.1, "Search best practices": This guide advises, "Avoid using the transaction command. The transaction command is inefficient from a search performance perspective... In most cases, you can replace the transaction command with the stats command. The stats command is much faster than the transaction command."

Scroll to Top