Splunk Search

Join or Subsearch performance

MaryvonneMB
Path Finder

Hi all,

I have a performance question about "join" and "subsearch".
Even join is a ressource-guzzler command I saw that sometimes it works better than a subsearch:

for example:

Query A =>  index=my_index [search index=other_one earliest=-1d@d|fields field1 |dedup field1|table field1]
Query B => index=my_index |join type=inner max=1 field1 [search index=other_index earliest=-1d@d |fields field1 |dedup field1|table field1]

in "my_index" I have about 20 millions of datas. in "other_index" + earliest=-1d@d I have about 80 000 datas. In this case the query A is faster than query B.
But if i have more than 300 000 datas in "other_index" + earliest=-1d@d, then query B is faster query A.

Does anyone have an explanation?

Thanks 🙂

0 Karma

adonio
Ultra Champion

try this:

Query A =>  earliest=-2d@d latest=-1d@d index=my_index [search index=other_one earliest=-1d@d|fields field1 |dedup field1|table field1]
 Query B => earliest=-2d@d latest=-1d@d index=my_index |join type=inner max=1 field1 [search index=other_index earliest=-1d@d |fields field1 |dedup field1|table field1]

is there still a difference?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...