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!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...