QuestionQ73Verified/Performance and TroubleshootingCopy linkReport a problemAsk AstroTutorSave questionWhich of the following searches is the most efficient?Aindex=www status=200 uri=/cart/checkout | append [search index = sales] | stats count, sum(revenue) as total_revenue by session_id | table total_revenue session_idB(index=www status=200 uri=/cart/checkout) OR (index=sales) | stats count, sum(revenue) as total_revenue by session_id | table total_revenue session_idCindex=www | append [search index = sales] | stats count, sum(revenue) as total_revenue by session_id | table total_revenue session_idD(index=www) OR (index=sales) | search (index=www status=200 uri=/cart/checkout) OR (index=sales) | stats count, sum (revenue) as total_revenue by session_id | table total_revenue session_idShow AnswerAnswerExplanationA single base search that restricts each index to the required events avoids the extra subsearch work performed by append. Splunk documents append as a non-streaming transforming command, whereas processing search work on indexers in parallel improves performance.Learn moreWrite better searchesappend commandShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion