<?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: Longer time frame does not return results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641799#M222322</link>
    <description>&lt;P&gt;Thank you for the response. I read that article but it is not straightforward to convert them. Can you help?&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 21:18:13 GMT</pubDate>
    <dc:creator>yk010123</dc:creator>
    <dc:date>2023-04-28T21:18:13Z</dc:date>
    <item>
      <title>Longer time frame does not return results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641796#M222320</link>
      <description>&lt;P&gt;When I run the following query:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"com.server"
| table id uri statusCode _time
| join type=inner saga_id [search "SecondServer" path="/myPath/*"
| tablepath, id
| where statusCode &amp;gt;= 400
| stats count by uri,statusCode,path
| sort -count
&lt;/LI-CODE&gt;&lt;P&gt;Over the last 15 minutes, it returns results. When I run it over a longer time range like 60 min or last 24h, it does not&lt;/P&gt;&lt;P&gt;I am puzzled by this and I am not sure what I am doing wrong. Could you please help?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 20:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641796#M222320</guid>
      <dc:creator>yk010123</dc:creator>
      <dc:date>2023-04-28T20:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Longer time frame does not return results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641798#M222321</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;your subsearch in join will take too long time and/or return too many results. In splunk you should try to avoid join almost every time. There are lot of .conf presentations how this can do. Here is one&amp;nbsp;&lt;A href="https://conf.splunk.com/files/2022/slides/PLA1528B.pdf" target="_blank"&gt;https://conf.splunk.com/files/2022/slides/PLA1528B.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 20:36:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641798#M222321</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-04-28T20:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Longer time frame does not return results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641799#M222322</link>
      <description>&lt;P&gt;Thank you for the response. I read that article but it is not straightforward to convert them. Can you help?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 21:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641799#M222322</guid>
      <dc:creator>yk010123</dc:creator>
      <dc:date>2023-04-28T21:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Longer time frame does not return results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641804#M222326</link>
      <description>&lt;P&gt;Something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;("com.server" statusCode &amp;gt;= 400) OR ("SecondServer" path="/myPath/*")
```| table id uri statusCode path```
| stats values(uri) as uri values(statusCode) as statusCode values(path) as path by id
| stats count uri,statusCode,path
| sort - count&lt;/LI-CODE&gt;&lt;P&gt;This assumes that id is unique among all events in com.server, and unique among all events SecondServer. &amp;nbsp;If it is not, you can use list function, but I'm not sure if it will make semantic sense.&lt;/P&gt;&lt;P&gt;Let me point out several other things in your description. &amp;nbsp;First, code snippet is unreasonably imprecise. &amp;nbsp;I have to speculate that the closing bracket for the join is immediately after the second table command. &amp;nbsp;If this is not the case, the above would be totally wrong. &amp;nbsp;Even in that command, I have to speculate that it is a table command followed by field name path. &amp;nbsp;If this is not the case, the whole semantics has to be changed again. &amp;nbsp;Also, there is no saga_id from the first search to join anything with; the subsearch doesn't output any saga_id, either. &amp;nbsp;You should expect zero output no matter what. &amp;nbsp;Problems like this may look mundane to people with intimate knowledge about your specific use case, dataset like yourself, but tend to discourage volunteers who want to help.&lt;/P&gt;&lt;P&gt;Second, why using inner join when you end up performing stats that doesn't concern id? &amp;nbsp;In addition, applying constraint of statusCode &amp;gt;=400 &lt;EM&gt;after&lt;/EM&gt;&amp;nbsp;inner join only exasperates Splunk's memory pressure which&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp; already points out. &amp;nbsp;Not that I will encourage this, but the following join might have worked.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"com.server" statusCode &amp;gt;= 400
```| table id uri statusCode```
| join id [search "SecondServer" path="/myPath/*"
  ```| table path, id```]
| stats count by uri,statusCode,path
| sort - count&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Yes, _time is not used so it doesn't matter in the table. &amp;nbsp;But ultimately, using table early in the search also affects efficiency. &amp;nbsp;When the end result is stats, you don't need to table anything except to help troubleshoot. &amp;nbsp;If you want to limit information, use fields instead.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 22:56:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Longer-time-frame-does-not-return-results/m-p/641804#M222326</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-04-28T22:56:18Z</dc:date>
    </item>
  </channel>
</rss>

