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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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