Splunk Search

Does using dedup improve performance? And where to place it in search?

kamryn
Explorer

I just finished the Splunk Fundamentals 1 course and in one of the videos they said:

For best performance we place dedup as early in the search as possible.

However I was just reviewing Splunk documentation and found this entry:

alt text

Which of these two suggestions is the most correct? Also, does using dedup in searches have any benefit to performance?

Tags (1)
1 Solution

koshyk
Super Champion

The commands like stats, dedup ( I won't include sort with this), is quite useful and doing it early makes the total dataset much less

Let's take an example
1) index=windows | eval newUser=user| stats count by newUser
vs
2) index=windows| stats count by user| rename user as newUser

in (1), you are doing an evaluation/renaming on every single event. But in (2), you are aggregating and then doing rename, which may be only for handful of data

the key part is stats and dedup reduces the data/rows to very minimal than doing it on all data

Please do analysis yourself and see how the speed/performance difference is using your dataset.

View solution in original post

koshyk
Super Champion

The commands like stats, dedup ( I won't include sort with this), is quite useful and doing it early makes the total dataset much less

Let's take an example
1) index=windows | eval newUser=user| stats count by newUser
vs
2) index=windows| stats count by user| rename user as newUser

in (1), you are doing an evaluation/renaming on every single event. But in (2), you are aggregating and then doing rename, which may be only for handful of data

the key part is stats and dedup reduces the data/rows to very minimal than doing it on all data

Please do analysis yourself and see how the speed/performance difference is using your dataset.

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...