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 😉

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...