<?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 improve xmlkv performance in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/improve-xmlkv-performance/m-p/265075#M16673</link>
    <description>&lt;P&gt;Hi, I is there any way to improve the performance extracting fields from xml logs?&lt;/P&gt;

&lt;P&gt;Here are the results from my queries&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="txn.log" host="none" sourcetype= "txn log" | rex "(?&amp;lt;timestamp&amp;gt;(\d{4}-\d{2}-\d{2} \d{2}\:\d{2}\:\d{2}\,\d{3})) (?&amp;lt;loglevel&amp;gt;DEBUG|INFO|WARN|ERROR) (?&amp;lt;origin&amp;gt;\[.*\]) (?s)(?&amp;lt;content&amp;gt;.*)"
* This search has completed and has returned 1,965 results by scanning 1,965 events in 0.946 seconds
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;-&lt;BR /&gt;
    source="txn.log" host="none" sourcetype= "txn log" | rex "(?&lt;TIMESTAMP&gt;(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3})) (?&lt;LOGLEVEL&gt;DEBUG|INFO|WARN|ERROR) (?&lt;ORIGIN&gt;[.&lt;EM&gt;]) (?s)(?&lt;CONTENT&gt;.&lt;/CONTENT&gt;&lt;/EM&gt;)" | xmlkv&lt;BR /&gt;
    * This search has completed and has returned 1,965 results by scanning 1,965 events in 12.125 seconds.&lt;/ORIGIN&gt;&lt;/LOGLEVEL&gt;&lt;/TIMESTAMP&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2016 15:09:50 GMT</pubDate>
    <dc:creator>marcosrios</dc:creator>
    <dc:date>2016-03-30T15:09:50Z</dc:date>
    <item>
      <title>improve xmlkv performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/improve-xmlkv-performance/m-p/265075#M16673</link>
      <description>&lt;P&gt;Hi, I is there any way to improve the performance extracting fields from xml logs?&lt;/P&gt;

&lt;P&gt;Here are the results from my queries&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="txn.log" host="none" sourcetype= "txn log" | rex "(?&amp;lt;timestamp&amp;gt;(\d{4}-\d{2}-\d{2} \d{2}\:\d{2}\:\d{2}\,\d{3})) (?&amp;lt;loglevel&amp;gt;DEBUG|INFO|WARN|ERROR) (?&amp;lt;origin&amp;gt;\[.*\]) (?s)(?&amp;lt;content&amp;gt;.*)"
* This search has completed and has returned 1,965 results by scanning 1,965 events in 0.946 seconds
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;-&lt;BR /&gt;
    source="txn.log" host="none" sourcetype= "txn log" | rex "(?&lt;TIMESTAMP&gt;(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\,\d{3})) (?&lt;LOGLEVEL&gt;DEBUG|INFO|WARN|ERROR) (?&lt;ORIGIN&gt;[.&lt;EM&gt;]) (?s)(?&lt;CONTENT&gt;.&lt;/CONTENT&gt;&lt;/EM&gt;)" | xmlkv&lt;BR /&gt;
    * This search has completed and has returned 1,965 results by scanning 1,965 events in 12.125 seconds.&lt;/ORIGIN&gt;&lt;/LOGLEVEL&gt;&lt;/TIMESTAMP&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 15:09:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/improve-xmlkv-performance/m-p/265075#M16673</guid>
      <dc:creator>marcosrios</dc:creator>
      <dc:date>2016-03-30T15:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: improve xmlkv performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/improve-xmlkv-performance/m-p/265076#M16674</link>
      <description>&lt;P&gt;&lt;CODE&gt;xmlkv&lt;/CODE&gt; tries to dynamically find all key-value pairs within the search results, so it can be quite slow.&lt;/P&gt;

&lt;P&gt;You are already extracting some fields with &lt;CODE&gt;rex&lt;/CODE&gt; - you could extract additional fields in the same way. The more fields that exist in the xml, the longer &lt;CODE&gt;xmlkv&lt;/CODE&gt; will run. So using &lt;CODE&gt;rex&lt;/CODE&gt; to extract only the fields that you need can be faster.&lt;/P&gt;

&lt;P&gt;What do you plan to do &lt;EM&gt;after&lt;/EM&gt; the &lt;CODE&gt;xmlkv&lt;/CODE&gt; step?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 01:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/improve-xmlkv-performance/m-p/265076#M16674</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2016-03-31T01:08:27Z</dc:date>
    </item>
  </channel>
</rss>

