<?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 multiple base search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710752#M240037</link>
    <description>&lt;P&gt;Hi i have a complex base search where iam comparing data from two indexes using left join and getting the results in a table query is working fine but its very slow&lt;/P&gt;&lt;P&gt;so i have now decided to split it into two base searches and then combine them in the panel&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=serverdata
  | rex "host_name=\"(?&amp;amp;lt;server_host_name&amp;amp;gt;[^\"]*)"
| lookup servers_businessgroup_appcode.csv appcode  output Business_Group as New_Business_Group
|chart dc(host_name) over appcode  by  host_environment
| eval TOTAL_servers=DEV+PAT+PROD
| table appcode DEV PAT PROD TOTAL_servers&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd Base search&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc 
| rex field=data "\|(?&amp;lt;server_name&amp;gt;[^\.|]+)?\|(?&amp;lt;appcode&amp;gt;[^\|]+)?\|"
| lookup servers_businessgroup_appcode.csv appcode  output Business_Group as New_Business_Group&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;i want to use this in third panel&amp;nbsp; combine both the searches using a left join and get the list of servers details in both the index&amp;nbsp;&lt;/P&gt;&lt;P&gt;question how can i use two base searches in a single search&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2025 15:58:05 GMT</pubDate>
    <dc:creator>secure</dc:creator>
    <dc:date>2025-02-05T15:58:05Z</dc:date>
    <item>
      <title>multiple base search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710752#M240037</link>
      <description>&lt;P&gt;Hi i have a complex base search where iam comparing data from two indexes using left join and getting the results in a table query is working fine but its very slow&lt;/P&gt;&lt;P&gt;so i have now decided to split it into two base searches and then combine them in the panel&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=serverdata
  | rex "host_name=\"(?&amp;amp;lt;server_host_name&amp;amp;gt;[^\"]*)"
| lookup servers_businessgroup_appcode.csv appcode  output Business_Group as New_Business_Group
|chart dc(host_name) over appcode  by  host_environment
| eval TOTAL_servers=DEV+PAT+PROD
| table appcode DEV PAT PROD TOTAL_servers&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd Base search&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=abc 
| rex field=data "\|(?&amp;lt;server_name&amp;gt;[^\.|]+)?\|(?&amp;lt;appcode&amp;gt;[^\|]+)?\|"
| lookup servers_businessgroup_appcode.csv appcode  output Business_Group as New_Business_Group&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;i want to use this in third panel&amp;nbsp; combine both the searches using a left join and get the list of servers details in both the index&amp;nbsp;&lt;/P&gt;&lt;P&gt;question how can i use two base searches in a single search&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 15:58:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710752#M240037</guid>
      <dc:creator>secure</dc:creator>
      <dc:date>2025-02-05T15:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: multiple base search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710754#M240038</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274955"&gt;@secure&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;in a dashboard it's possible to define more base searches, but in each panel, it's possible to use only one base search, not more.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 16:03:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710754#M240038</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-02-05T16:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: multiple base search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710768#M240040</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274955"&gt;@secure&lt;/a&gt;&amp;nbsp;as&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;stated you can have only one base search.&lt;/P&gt;&lt;P&gt;What would it mean to have 2 in a panel?&amp;nbsp; The base search just returns the results so how could you use 2 together?&lt;BR /&gt;&lt;BR /&gt;I am not sure if this helps but you can have a base search use another base search.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 19:58:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710768#M240040</guid>
      <dc:creator>burwell</dc:creator>
      <dc:date>2025-02-05T19:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: multiple base search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710785#M240046</link>
      <description>&lt;P&gt;Technically you could use both base searches, but it's a bit fiddly and isn't really going to save you anything as the searches have to run anyway. You would get the job ids of each base search and then in your panel search you would use loadjob to load each of the jobs.&amp;nbsp; However, you're still going to have to load the second job in some kind of subsearch (join?) so not sure where you're trying to go with this.&lt;/P&gt;&lt;P&gt;If you are simply trying to speed up a join search, you can't achieve this with two base searches, as you are simply not changing anything and it will take the time it takes.&lt;/P&gt;&lt;P&gt;The solution for a poor performing search using join is to remove the use of join and rewrite the search in another way.&lt;/P&gt;&lt;P&gt;Looking at your existing searches I'm not sure why you are trying to combine these in the first place, because you have appcode in your first search and you simply want appcode to get the list of details from the lookup.&lt;/P&gt;&lt;P&gt;You are doing a lookup in the primary search but doing nothing with the retrieved data. Why don't you just do the lookup in your primary search after the chart, i.e.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=serverdata
  | rex "host_name=\"(?&amp;amp;lt;server_host_name&amp;amp;gt;[^\"]*)"
|chart dc(host_name) over appcode  by  host_environment
| eval TOTAL_servers=DEV+PAT+PROD
| table appcode DEV PAT PROD TOTAL_servers
| lookup servers_businessgroup_appcode.csv appcode  output Business_Group as New_Business_Group&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 00:34:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-base-search/m-p/710785#M240046</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2025-02-06T00:34:08Z</dc:date>
    </item>
  </channel>
</rss>

