SPLK-5001 · Question #119
Which of the following SPL searches is likely to return results the fastest?
The correct answer is C. index=network sourcetype=netflow src_ip=1.2.3.4 src_port=2938. Chosen option is the most efficient because it restricts the search to a specific index and sourcetype and applies all field filters (src_ip, src_port, protocol) at the very start. This minimizes the volume of data scanned before invoking the lighter-weight stats command…
Question
Which of the following SPL searches is likely to return results the fastest?
Options
- Asrc_port=2938 AND protocol=tcp | stats count by src_ip | search
- Bindex=network src_port=2938 protocol=tcp | stats count by src_ip |
- Cindex=network sourcetype=netflow src_ip=1.2.3.4 src_port=2938
- Dsrc_ip=1.2.3.4 src_port=2938 protocol=tcp | stats count
How the community answered
(35 responses)- A6% (2)
- B14% (5)
- C77% (27)
- D3% (1)
Explanation
Chosen option is the most efficient because it restricts the search to a specific index and sourcetype and applies all field filters (src_ip, src_port, protocol) at the very start. This minimizes the volume of data scanned before invoking the lighter-weight stats command, making it faster than searches that leave out index/sourcetype constraints or postpone filtering.
Topics
Community Discussion
No community discussion yet for this question.