<?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 Can this query be written more efficiently? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281708#M176693</link>
    <description>&lt;P&gt;It's a query for a staked column chart.&lt;/P&gt;

&lt;P&gt;index=myCompIn source="/locatedin/mySrc.log" "Reply Back" "CAT-IN " "SOME STUFF" | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false true false)"] | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false false true)"]|timechart span=1d count AS aTXN | join _time&lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" RT_DCC_TYPE=converted | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false true false)"] | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false false true)"] | timechart span=1d count AS bTXN]&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 10:59:44 GMT</pubDate>
    <dc:creator>dfexsplunk</dc:creator>
    <dc:date>2020-09-29T10:59:44Z</dc:date>
    <item>
      <title>Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281708#M176693</link>
      <description>&lt;P&gt;It's a query for a staked column chart.&lt;/P&gt;

&lt;P&gt;index=myCompIn source="/locatedin/mySrc.log" "Reply Back" "CAT-IN " "SOME STUFF" | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false true false)"] | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false false true)"]|timechart span=1d count AS aTXN | join _time&lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" RT_DCC_TYPE=converted | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false true false)"] | append &lt;BR /&gt;
[search index=myCompIn source="/locatedin/mySrc.log" "CAT-IN | 91.8.1952.7.4 | (false false true)"] | timechart span=1d count AS bTXN]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281708#M176693</guid>
      <dc:creator>dfexsplunk</dc:creator>
      <dc:date>2020-09-29T10:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281709#M176694</link>
      <description>&lt;P&gt;Try this&lt;BR /&gt;
*&lt;STRONG&gt;&lt;EM&gt;UPDATED&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myCompIn source="/locatedin/mySrc.log" "Reply Back" "CAT-IN | 91.8.1952.7.4" | timechart span=1d  count(eval(match(_raw, "SOME STUFF")) as A count(eval(RT_DCC_TYPE="converted")) as B
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Sep 2016 15:55:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281709#M176694</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-19T15:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281710#M176695</link>
      <description>&lt;P&gt;Thanks for this sundareshr but no luck with it, I get the following error "Error in 'timechart' command: Repeated group-by field '_time'."&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 08:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281710#M176695</guid>
      <dc:creator>dfexsplunk</dc:creator>
      <dc:date>2016-09-20T08:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281711#M176696</link>
      <description>&lt;P&gt;Try the updated answer.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 11:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281711#M176696</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-20T11:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281712#M176697</link>
      <description>&lt;P&gt;Tanx. Still the same error code produced.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 13:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281712#M176697</guid>
      <dc:creator>dfexsplunk</dc:creator>
      <dc:date>2016-09-20T13:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281713#M176698</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; try this time&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 14:14:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281713#M176698</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-20T14:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281714#M176699</link>
      <description>&lt;P&gt;Tanx. This runs without error but does not find any results!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 14:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281714#M176699</guid>
      <dc:creator>dfexsplunk</dc:creator>
      <dc:date>2016-09-20T14:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281715#M176700</link>
      <description>&lt;P&gt;Do you get any data back when you remove the last segment (timechart)?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 14:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281715#M176700</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-20T14:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281716#M176701</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myCompIn source="/locatedin/mySrc.log" ("Reply Back" "CAT-IN " "SOME STUFF") OR ("CAT-IN | 91.8.1952.7.4 | (false true false)" ) OR ("CAT-IN | 91.8.1952.7.4 | (false false true)") OR ( RT_DCC_TYPE=converted ) OR ( "CAT-IN | 91.8.1952.7.4 | (false true false)") OR ( "CAT-IN | 91.8.1952.7.4 | (false false true)" ) 
| eval catin=case(searchmatch("CAT-IN | 91.8.1952.7.4 | (false true false)",1,searchmatch("CAT-IN | 91.8.1952.7.4 | (false false true)",1,true(),0)
| eval aTXN=if(searchmatch("\"Reply Back\" \"CAT-IN \" \"SOME STUFF\""),1,0) + catin
| eval bTXN=if(searchmatch("RT_DCC_TYPE=converted"),1,0) + catin
| timechart span=1d sum(aTXN) as aTXN sum(bTXN) as bTXN
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Sep 2016 15:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281716#M176701</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-20T15:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can this query be written more efficiently?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281717#M176702</link>
      <description>&lt;P&gt;This worked exactly. Tanx very much.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2016 16:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-this-query-be-written-more-efficiently/m-p/281717#M176702</guid>
      <dc:creator>dfexsplunk</dc:creator>
      <dc:date>2016-09-20T16:23:37Z</dc:date>
    </item>
  </channel>
</rss>

