Splunk Search

Retrieve all the values for a single field

cmak
Contributor

I am looking for a fast way to retrieve all the values for a single field. I have been doing this

index=my_index| top limit=1000 my_field

However, as I have many events, this search takes several seconds and is quite slow. I was wondering if there is a faster way to do this, or to speed it up?

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

Not really. If you want every possible value, Splunk has to actually look at every single event to be sure it has them all. The main things you can do to speed it up are to use "Fast Mode" rather than "Verbose" or "Smart", or to run the search from the command line. If you're on a version older than 5.0, use the "Advanced Charting" view rather than the regular timeline view. Beyond that, the most effective way to get this search faster is to use more indexers.

0 Karma

cmak
Contributor

Is there any way to specify it to make the search in fast mode using advanced XML with the Search module?

0 Karma

cmak
Contributor

I found a faster way that made it slightly faster

index=my_index| stats count by my_field

Is there a better way?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...