Splunk Search

Using Fields Efficiently

peasead
Path Finder

I'm trying to get a search to run as efficiently as possible and a couple of the guys on my team have been going back and forth regarding the placement of the 'fields' syntax.

I have always put the 'fields' syntax immediately after my sourcetype, but some people put it in the middle of the search, some put it before/after the math that is done, some put it right before the 'stats', 'table', etc.

I looked in the documentation, but I didn't see anything saying that it should go "here" or "there".

Is there a preferred place to put the 'fields' syntax?

1 Solution

yannK
Splunk Employee
Splunk Employee

If you really want to go that way, use the search inspector (the "i" button) to see the search speed.
and run the same search on the same time window with several variations of your search.

View solution in original post

yannK
Splunk Employee
Splunk Employee

If you really want to go that way, use the search inspector (the "i" button) to see the search speed.
and run the same search on the same time window with several variations of your search.

peasead
Path Finder

Great idea.

As it turns out, it doesn't matter much.

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...