<?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: Why Does JSON Logging Make Queries Slower? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-Does-JSON-Logging-Make-Queries-Slower/m-p/387250#M69467</link>
    <description>&lt;P&gt;We have plenty of data coming in json, and we haven't detected it not that slow.  some possible checks you could do:&lt;BR /&gt;
1. are you indexing JSON (determining it as structured format) during indextime or search time?&lt;BR /&gt;
2. Do NOT index data into another format. Just index as pure JSON and extract required fields at searchtime&lt;BR /&gt;
3. You don't need regexes to parse JSON if you have indexed it correctly. or alternatively you can use &lt;CODE&gt;spath&lt;/CODE&gt; command do do during search time&lt;BR /&gt;
4. Sometimes it may not be pure JSON? Please validate your whole event into JSON validator/parser checker&lt;/P&gt;

&lt;P&gt;If you put the original data and your props/transforms, then we can pinpoint the correct config&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2019 20:59:06 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2019-05-26T20:59:06Z</dc:date>
    <item>
      <title>Why Does JSON Logging Make Queries Slower?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-Does-JSON-Logging-Make-Queries-Slower/m-p/387249#M69466</link>
      <description>&lt;P&gt;I was previously logging my API requests and responses as strings. So my logs would show:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Request: {"name": "Joe", "age": "4", ...}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the entirety of &lt;CODE&gt;{"name": "Joe", "age": "4", ...}&lt;/CODE&gt; is a string.&lt;/P&gt;

&lt;P&gt;In order to get the information out, I had to parse the string with regexes. &lt;/P&gt;

&lt;P&gt;I wanted to log this with Splunk fields though. So I began logging the JSON, and my logs showed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Request:
  name: Joe
  age: 4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is that my queries now take MUCH longer. I have to search for &lt;CODE&gt;Request.name&lt;/CODE&gt; instead of using regexes to get the name. Does anyone know why it's taking so much longer?&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 18:06:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-Does-JSON-Logging-Make-Queries-Slower/m-p/387249#M69466</guid>
      <dc:creator>splunkqy</dc:creator>
      <dc:date>2019-05-26T18:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why Does JSON Logging Make Queries Slower?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-Does-JSON-Logging-Make-Queries-Slower/m-p/387250#M69467</link>
      <description>&lt;P&gt;We have plenty of data coming in json, and we haven't detected it not that slow.  some possible checks you could do:&lt;BR /&gt;
1. are you indexing JSON (determining it as structured format) during indextime or search time?&lt;BR /&gt;
2. Do NOT index data into another format. Just index as pure JSON and extract required fields at searchtime&lt;BR /&gt;
3. You don't need regexes to parse JSON if you have indexed it correctly. or alternatively you can use &lt;CODE&gt;spath&lt;/CODE&gt; command do do during search time&lt;BR /&gt;
4. Sometimes it may not be pure JSON? Please validate your whole event into JSON validator/parser checker&lt;/P&gt;

&lt;P&gt;If you put the original data and your props/transforms, then we can pinpoint the correct config&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 20:59:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-Does-JSON-Logging-Make-Queries-Slower/m-p/387250#M69467</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-26T20:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why Does JSON Logging Make Queries Slower?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-Does-JSON-Logging-Make-Queries-Slower/m-p/387251#M69468</link>
      <description>&lt;P&gt;I did not know there was a difference in the time of indexing. I'll look into that for #1. &lt;/P&gt;

&lt;P&gt;4 - it is pure JSON.&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2019 21:22:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-Does-JSON-Logging-Make-Queries-Slower/m-p/387251#M69468</guid>
      <dc:creator>splunkqy</dc:creator>
      <dc:date>2019-05-26T21:22:47Z</dc:date>
    </item>
  </channel>
</rss>

