QuestionQ48Verified/SPL and Efficient SearchingCopy linkReport a problemAsk AstroTutorSave questionWhich of the following Splunk searches correctly returns results in the most performant manner?Aindex=foo host=i-478619733 | stats range(_time) as duration by src_ip | bin duration span=5min | stats count by duration, hostB| stats range(_time) as duration by src_ip | index=foo host=i-478619733 | bin duration span=5min | stats count by duration, hostCindex=foo host=i-478619733 | transaction src_ip |stats count by hostDindex=foo | transaction src_ip |stats count by host | search host=i-478619733Show AnswerAnswerExplanationInitial search predicates such as index=foo and host=i-478619733 restrict the event set before reporting commands execute. This minimizes disk retrieval and in-memory processing. transaction is more resource-intensive than the required statistical aggregation, and applying filters after transforming commands wastes work.Learn moreQuick tips for optimizationWrite better searchesShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion