Splunk Search

Is there a difference in efficiency between this sort and reverse?

yuanliu
SplunkTrust
SplunkTrust

Delta cites an example using sort - _time.

Is there a difference in efficiency between this sort and reverse?

1 Solution

woodcock
Esteemed Legend

Using reverse should be much more effiicient because it just rewrites the list whereas sort must continuously compare values. It should be sort 0 + _time.

View solution in original post

0 Karma

aberkow
Builder

If you look into the job inspector, you should be able to see the runtime and other diagnostic information for your case as well!

0 Karma

to4kawa
Ultra Champion

When I examine it, sort takes more time.

Also, reverse is a command that reverses the log order, so if the time series is disjoint, reverse it.
This is also different from sort .

0 Karma

woodcock
Esteemed Legend

Using reverse should be much more effiicient because it just rewrites the list whereas sort must continuously compare values. It should be sort 0 + _time.

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...