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" 

Labels (1)
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!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...