Splunk Search

Return "No result" when joining two tables if the subsearch has too many records

kelvin56887
Explorer

The query is as follows:
index="inverntory" source="s1" UUID="C64" | join UUID [search index="inverntory" source="s1"]
**This query is a simplified version so please don't ask me the reason for doing this kind of join.

1. The subsearch [search index="inverntory" source="s1"] has huge set of results
2. <<<<< index="inverntory" source="s1" UUID="C64" >>>>>> => Return 1 row

However, it always return "No result".

But for
index="inverntory" source="s1" UUID="C64" | join UUID [search index="inverntory" source="s1" UUID="C64" ]
OR index="inverntory" source="s1" | join UUID [search index="inverntory" source="s1" UUID="C64" ]
They can return results.

Anyone knows WHY?

0 Karma
1 Solution

aweitzman
Motivator

Subsearches are limited (max is 10500, I believe) in the number of results they can return to the main search. If your "needle" isn't in the part of the "haystack" that gets returned, you may see no results in that case.

By flipping it, you have made it so the subsearch only has 1 result, which is easily applied to the main search, and you get the result. The main search is not limited the way the subsearch is.

Read about subsearch limits here: http://docs.splunk.com/Documentation/Splunk/latest/Search/Aboutsubsearches

View solution in original post

linu1988
Champion

50000 is the subsearch limit. it will return the results but they should be partial if you are actually providing the proper joining criteria.

aweitzman
Motivator

Subsearches are limited (max is 10500, I believe) in the number of results they can return to the main search. If your "needle" isn't in the part of the "haystack" that gets returned, you may see no results in that case.

By flipping it, you have made it so the subsearch only has 1 result, which is easily applied to the main search, and you get the result. The main search is not limited the way the subsearch is.

Read about subsearch limits here: http://docs.splunk.com/Documentation/Splunk/latest/Search/Aboutsubsearches

aweitzman
Motivator

@linu1988 is right about the join subsearch limit (as opposed to the standard subsearch limit). That 50000 limit is mentioned near the bottom of the page I pointed to.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...