Splunk Search

Does sequence matter in search?

Pathik
Path Finder

Does sequence matter in search? from below 2 queries, which is recommended or both will perform with same performance?

Query1:

index=myindex AND "mystring" AND host=myprodhost*

Query2:

index=myindex AND host=myprodhost* AND "mystring" 

0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @Pathik,

it's absolutely the same!

and you don't need to use the "AND" operator.

Ciao.

Giuseppe

View solution in original post

0 Karma

Pathik
Path Finder

@gcusello  thanks, so splunk would find best optimum fields to search first and then proceed with others... thanks

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Pathik,

it's absolutely the same!

and you don't need to use the "AND" operator.

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Pathik,

the search algorithm of Splunk choose the most efficient combination of fields.

Ciao and good splunking.

Giuseppe

P.S. Karma Points are appreciated 😉

Get Updates on the Splunk Community!

Data Management Digest – November 2025

  Welcome to the inaugural edition of Data Management Digest! As your trusted partner in data innovation, the ...

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...