<?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 Is using the transaction command an overkill in this case? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-using-the-transaction-command-an-overkill-in-this-case/m-p/438170#M124732</link>
    <description>&lt;P&gt;If I have two searches as below  (uniqueId is a common field exists in both searches, while field1, field2 are unique fields only applying to it search)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVENT_CONTAIN_SOME_KEYWORD | table uniqueId, field1
EVENT_CONTAIN_ANOTHER_KEYWORD | table uniqueId, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then i can use the transaction command to combine the table (it is safe to assume there are only one field1 and one field2 for every uniqueId)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVENT_CONTAIN_SOME_KEYWORD  OR EVENT_CONTAIN_ANOTHER_KEYWORD
| transaction  uniqueId
| table uniqueId, field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not using any of those startswith / endswith / maxspan / maxpause args really.&lt;BR /&gt;
Is there a way to avoid using transaction, and make my query more efficient?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 17 Dec 2018 14:37:17 GMT</pubDate>
    <dc:creator>jliu531</dc:creator>
    <dc:date>2018-12-17T14:37:17Z</dc:date>
    <item>
      <title>Is using the transaction command an overkill in this case?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-using-the-transaction-command-an-overkill-in-this-case/m-p/438170#M124732</link>
      <description>&lt;P&gt;If I have two searches as below  (uniqueId is a common field exists in both searches, while field1, field2 are unique fields only applying to it search)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVENT_CONTAIN_SOME_KEYWORD | table uniqueId, field1
EVENT_CONTAIN_ANOTHER_KEYWORD | table uniqueId, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then i can use the transaction command to combine the table (it is safe to assume there are only one field1 and one field2 for every uniqueId)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVENT_CONTAIN_SOME_KEYWORD  OR EVENT_CONTAIN_ANOTHER_KEYWORD
| transaction  uniqueId
| table uniqueId, field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not using any of those startswith / endswith / maxspan / maxpause args really.&lt;BR /&gt;
Is there a way to avoid using transaction, and make my query more efficient?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Dec 2018 14:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-using-the-transaction-command-an-overkill-in-this-case/m-p/438170#M124732</guid>
      <dc:creator>jliu531</dc:creator>
      <dc:date>2018-12-17T14:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is using the transaction command an overkill in this case?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-using-the-transaction-command-an-overkill-in-this-case/m-p/438171#M124733</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;stats&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EVENT_CONTAIN_SOME_KEYWORD OR EVENT_CONTAIN_ANOTHER_KEYWORD
| stats values(field1) as field1, values(field2) as field2 by uniqueId
| table uniqueId, field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Dec 2018 15:06:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-using-the-transaction-command-an-overkill-in-this-case/m-p/438171#M124733</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-12-17T15:06:12Z</dc:date>
    </item>
  </channel>
</rss>

