<?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: table order with eval in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/table-order-with-eval/m-p/211525#M187874</link>
    <description>&lt;P&gt;Not a large number of fields - only 24 including host, source, and sourcetype. Putting |fields in did not help. &lt;/P&gt;

&lt;P&gt;Here are the results from job inspector for 'command.ldapfilter'.&lt;/P&gt;

&lt;P&gt;|table |eval |ldapfilter = 18.32 seconds&lt;BR /&gt;
   |eval |ldapfilter |table = 120.52 seconds&lt;BR /&gt;
   |fields |eval |ldapfilter |table = 120.43 seconds&lt;/P&gt;</description>
    <pubDate>Wed, 30 Dec 2015 16:49:46 GMT</pubDate>
    <dc:creator>mikesangray</dc:creator>
    <dc:date>2015-12-30T16:49:46Z</dc:date>
    <item>
      <title>table order with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/table-order-with-eval/m-p/211523#M187872</link>
      <description>&lt;P&gt;I've got a search that does a &lt;CODE&gt;|table&lt;/CODE&gt; prior to doing an &lt;CODE&gt;|eval&lt;/CODE&gt; for &lt;CODE&gt;ldapfilter&lt;/CODE&gt;. The search results are displayed in a seemingly random order (not the order specified after &lt;CODE&gt;|table&lt;/CODE&gt;). Is there a better way to do this so I can specify the results display order?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah |table _time,UserName,displayName,IpAddress |eval ID=UserName |ldapfilter search="(&amp;amp;(samAccountName=$ID$))" attrs="displayName"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: For some reason doing the order of &lt;CODE&gt;|table&lt;/CODE&gt; vs. &lt;CODE&gt;|eval |ldapfilter&lt;/CODE&gt; heavily impacts search performance.&lt;/P&gt;

&lt;P&gt;Faster (11-12 secs):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah |table _time,UserName,displayName,IpAddress |eval ID=UserName |ldapfilter search="(&amp;amp;(samAccountName=$ID$))" attrs="displayName"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Much slower (116-117 secs):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah |eval ID=UserName |ldapfilter search="(&amp;amp;(samAccountName=$ID$))" attrs="displayName" |table _time,UserName,displayName,IpAddress
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Dec 2015 16:18:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/table-order-with-eval/m-p/211523#M187872</guid>
      <dc:creator>mikesangray</dc:creator>
      <dc:date>2015-12-30T16:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: table order with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/table-order-with-eval/m-p/211524#M187873</link>
      <description>&lt;P&gt;Do your events have a large number of fields?  If so, that might explain the performance difference as the table command would reduce the number of fields to process.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah |fields _time,UserName,displayName,IpAddress | eval ID=UserName |ldapfilter search="(&amp;amp;(samAccountName=$ID$))" attrs="displayName" |table _time,UserName,displayName,IpAddress
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Dec 2015 16:27:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/table-order-with-eval/m-p/211524#M187873</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-12-30T16:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: table order with eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/table-order-with-eval/m-p/211525#M187874</link>
      <description>&lt;P&gt;Not a large number of fields - only 24 including host, source, and sourcetype. Putting |fields in did not help. &lt;/P&gt;

&lt;P&gt;Here are the results from job inspector for 'command.ldapfilter'.&lt;/P&gt;

&lt;P&gt;|table |eval |ldapfilter = 18.32 seconds&lt;BR /&gt;
   |eval |ldapfilter |table = 120.52 seconds&lt;BR /&gt;
   |fields |eval |ldapfilter |table = 120.43 seconds&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 16:49:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/table-order-with-eval/m-p/211525#M187874</guid>
      <dc:creator>mikesangray</dc:creator>
      <dc:date>2015-12-30T16:49:46Z</dc:date>
    </item>
  </channel>
</rss>

