<?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: convert mktime() Vs  eval strptime()  Which is faster and better in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94446#M24351</link>
    <description>&lt;P&gt;I tested both with log volume of 4.2 million records. I did not see much difference.. convert was faster by fraction of seconds.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2013 06:20:51 GMT</pubDate>
    <dc:creator>strive</dc:creator>
    <dc:date>2013-07-15T06:20:51Z</dc:date>
    <item>
      <title>convert mktime() Vs  eval strptime()  Which is faster and better</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94443#M24348</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We can use &lt;CODE&gt;convert mktime()&lt;/CODE&gt; or &lt;CODE&gt;eval strptime()&lt;/CODE&gt; to convert time into epoch time format. I am more interested in knowing which is better and faster. &lt;/P&gt;

&lt;P&gt;Consider a scenario where 50GB or 100GB of log events are indexed per day. In this case which one do you recommend.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;

&lt;P&gt;Strive&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2013 12:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94443#M24348</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-07-14T12:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: convert mktime() Vs  eval strptime()  Which is faster and better</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94444#M24349</link>
      <description>&lt;P&gt;Are you talking about expressing the _time field in epoch format? Or did you mean some other field?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2013 12:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94444#M24349</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-07-14T12:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: convert mktime() Vs  eval strptime()  Which is faster and better</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94445#M24350</link>
      <description>&lt;P&gt;Yes expressing _time field in epoch format. Also we have some time fields in logs. Session start time, session end time etc...&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2013 13:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94445#M24350</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-07-14T13:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: convert mktime() Vs  eval strptime()  Which is faster and better</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94446#M24351</link>
      <description>&lt;P&gt;I tested both with log volume of 4.2 million records. I did not see much difference.. convert was faster by fraction of seconds.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2013 06:20:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94446#M24351</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2013-07-15T06:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: convert mktime() Vs  eval strptime()  Which is faster and better</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94447#M24352</link>
      <description>&lt;P&gt;It looks like you've come to your answer. I don't think there is really much difference and in fact I suspect they probably use pretty much the same libraries on the backend, just exposed slightly differently.&lt;/P&gt;

&lt;P&gt;Just an aside, which sowings seemed to be moving to. _time is already in epoch, there is some magical javascript that just recognises when _time is on screen and changes it to a readable format, try doing a rename on _time and using the new name in a table, it will suddenly be an epoch!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2013 07:40:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94447#M24352</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2013-07-15T07:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: convert mktime() Vs  eval strptime()  Which is faster and better</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94448#M24353</link>
      <description>&lt;P&gt;The answer lies in the difference between convert and eval, rather than between mktime() and strptime(). Eval-based commands irrevocably alter the field's data while convert is more of a "visual gloss" in that the field retains the original data and only the view/UI shows the converted value.&lt;/P&gt;

&lt;P&gt;In most cases, this won't matter but might be important to consider if you're running jobs, reports, etc. in some method besides a human looking at a screen.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 20:09:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94448#M24353</guid>
      <dc:creator>RMartinezDTV</dc:creator>
      <dc:date>2017-01-26T20:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: convert mktime() Vs  eval strptime()  Which is faster and better</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94449#M24354</link>
      <description>&lt;P&gt;I think you're explaining difference between eval and fieldformat command. The convert command updates the original field value (or creates a new if AS clause is used), not just the UI show like fieldformat. &lt;/P&gt;

&lt;P&gt;You're correct about the answer lies int eh difference between convert and eval. You can update only one field at a time in eval whereas in convert you can update multiple fields and/or use wildcard in the field names. I don't think there is much different in speed between mktime and strptime.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 20:18:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-mktime-Vs-eval-strptime-Which-is-faster-and-better/m-p/94449#M24354</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-01-26T20:18:33Z</dc:date>
    </item>
  </channel>
</rss>

