Splunk Search

Sort returning different results?

questionsdaniel
Observer

Hi, I'm attempting to write a search where I return a top 10 of a value. However, I am noticing that I return different top 10's when I rerun the search. Does this happen to anyone else? 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Are you using the exact same time span each time?  That is, not '-24h', but "2025-06-23:15:10:00".

Please share your SPL.

---
If this reply helps you, Karma would be appreciated.

livehybrid
SplunkTrust
SplunkTrust

Hi @questionsdaniel 

Are you re-running it against the exact same earliest/latest time?

Also - the top command can only process the first 50,000 results - so its likely that the first 50,000 events returned from your indexers are different each time (arrive in a different order for example) which is why you see different values.

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...