<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Inputlookup subsearch and join in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458022#M129354</link>
    <description>&lt;P&gt;Why aren't you trying the | lookup command on that ?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=windows | lookup default_user_accounts.csv  OUTPUT user&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2019 07:16:10 GMT</pubDate>
    <dc:creator>tiagofbmm</dc:creator>
    <dc:date>2019-07-09T07:16:10Z</dc:date>
    <item>
      <title>Inputlookup subsearch and join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458021#M129353</link>
      <description>&lt;P&gt;I have a question about two searches. The first one is much more faster than the second one, but I think that they do the same thing so I am wondering am I right about that assumption. &lt;/P&gt;

&lt;P&gt;First search&lt;BR /&gt;
index=windows &lt;STRONG&gt;| join user&lt;/STRONG&gt; [| inputlookup default_user_accounts.csv | fields user ]&lt;BR /&gt;
Second search &lt;BR /&gt;
index=windows [| inputlookup default_user_accounts.csv | fields user ]&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:12:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458021#M129353</guid>
      <dc:creator>darioapis</dc:creator>
      <dc:date>2020-09-30T01:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup subsearch and join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458022#M129354</link>
      <description>&lt;P&gt;Why aren't you trying the | lookup command on that ?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=windows | lookup default_user_accounts.csv  OUTPUT user&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 07:16:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458022#M129354</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2019-07-09T07:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup subsearch and join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458023#M129355</link>
      <description>&lt;P&gt;Would that be faster than a regular join?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 07:52:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458023#M129355</guid>
      <dc:creator>darioapis</dc:creator>
      <dc:date>2019-07-09T07:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup subsearch and join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458024#M129356</link>
      <description>&lt;P&gt;You can try it yourself but that should be the fastest way from my experience&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 07:54:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458024#M129356</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2019-07-09T07:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup subsearch and join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458025#M129357</link>
      <description>&lt;P&gt;Hi darioapis,&lt;BR /&gt;
the join command it isn't a fast command, so it must be used only when you haven't any other solution!&lt;BR /&gt;
In addition the lookup command is substancially a join command, so you don't need to use the join command, but it's very faster the lookup command.&lt;BR /&gt;
So I suggest to use something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows 
| lookup default_user_accounts.csv user OUTPUT my_fields
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Beware that the key field must be the same both in search and lookup, if not, use the option &lt;CODE&gt;lookup_user AS user&lt;/CODE&gt; after the lookup definition.&lt;BR /&gt;
For more information see &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/Lookup"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/Lookup&lt;/A&gt; .&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;

&lt;P&gt;P.S. a quick tip: when you use Splunk, forget your DB approach, Splunk thinks different!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 07:55:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458025#M129357</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-07-09T07:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup subsearch and join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458026#M129358</link>
      <description>&lt;P&gt;Normally, JOIN is not used in extraction.&lt;/P&gt;

&lt;P&gt;First search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows | join user [| inputlookup default_user_accounts.csv | fields user ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The default is INNER JOIN, so logs that are not JOIN will be deleted. It's slow because it will join. It is not usually used as an extraction condition.&lt;/P&gt;

&lt;P&gt;Second search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows [| inputlookup default_user_accounts.csv | fields user ]
↓
index=windows (user=A OR user=b OR user=c)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As it is converted as above and search is fast.&lt;/P&gt;

&lt;P&gt;Do this if you want to use lookups. Lookup is faster than JOIN.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=windows 
| lookup default_user_accounts.csv user OUTPUT my_fields
| where notisnull(my_fields)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jul 2019 09:27:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458026#M129358</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2019-07-09T09:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup subsearch and join</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458027#M129359</link>
      <description>&lt;P&gt;Also join has limits and will clip your results. Friends don't let friends use JOIN&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 13:24:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-subsearch-and-join/m-p/458027#M129359</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2019-07-09T13:24:51Z</dc:date>
    </item>
  </channel>
</rss>

