<?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: Performance fields/stats/table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618292#M214885</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did some tests and looking at Job inspector phase0 for litsearch, it tells what is going one&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so with the basic search&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=x
| table rulename
| stats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Job inspector reports&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;litsearch index=x | ifields + rulename | addinfo type=count label=prereport_events track_fieldmeta_events=true | fields keepcolorder=t "prestats_reserved_*" "psrsvd_*" "rulename" | prestats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;replacing table with fields gives&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;litsearch index=x | fields + rulename | addinfo type=count label=prereport_events track_fieldmeta_events=true | fields keepcolorder=t "prestats_reserved_*" "psrsvd_*" "rulename" | prestats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;and with neither, you get&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;litsearch index=x | addinfo type=count label=prereport_events track_fieldmeta_events=true | fields keepcolorder=t "prestats_reserved_*" "psrsvd_*" "rulename" | prestats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;so, very minor differences, but all doing prestats and returning only the restricted field list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2022 22:12:48 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2022-10-25T22:12:48Z</dc:date>
    <item>
      <title>Performance fields/stats/table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618199#M214855</link>
      <description>&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Fields-vs-table-vs-nothing/m-p/498525#M194897" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/Fields-vs-table-vs-nothing/m-p/498525#M194897&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I was looking at a Splunk authored Search&lt;/P&gt;
&lt;P&gt;&lt;A href="https://research.splunk.com/cloud/042a3d32-8318-4763-9679-09db2644a8f2/" target="_blank" rel="noopener"&gt;https://research.splunk.com/cloud/042a3d32-8318-4763-9679-09db2644a8f2/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;which does exactly the table followed by stats.&lt;/P&gt;
&lt;P&gt;table in this case, seems totally unnecessary and due to the transformation would incur a performance cost.&lt;/P&gt;
&lt;P&gt;So, specifically in a clustered index environment, how does&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| fields A B C
| stats count by A B C&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;work from a data movement POV - clearly the fields will limit the return of fields from the indexers to the SH, but if there is no fields, does the stats run entirely on the SH, with (a) ALL raw data returned from the indexer, or (b) does the indexer only return the fields the stats command is going to use on the SH?&lt;/P&gt;
&lt;P&gt;If it is (a) then clearly a benefit in using fields before stats, but my expectations would be that it should work like (b).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 03:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618199#M214855</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-25T03:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Performance fields/stats/table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618207#M214856</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm not sure, but for my knowledge I'm agree with &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/1406"&gt;@woodcock&lt;/a&gt;: using fields before stats, you limit the data to tranfer from IDX to the SH so you limit the bandwidth and memory occupation and so also you have better performances.&lt;/P&gt;&lt;P&gt;I never used table before stats, but it's a forma mentis of mine and I didn't saw the search you mentioned.&lt;/P&gt;&lt;P&gt;About fields I used it before stats only when an event has many fields otherwise I didn't find a great advantage in using.&lt;/P&gt;&lt;P&gt;And when I have many events I prefer to use DataModels or summary indexes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 06:51:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618207#M214856</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-25T06:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Performance fields/stats/table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618210#M214858</link>
      <description>&lt;P&gt;It would make sense that stats on the IDX will do something similar to "sort" on the IDX, where it will presort its own results before sending to the SH.&lt;/P&gt;&lt;P&gt;I would therefore expect stats on the IDX to perhaps run pre-stats of its own data before returning the split by fields to the SH and therefore "fields" would NEVER be necessary before stats.&lt;/P&gt;&lt;P&gt;... but ... would be nice to get a definitive answer&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 07:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618210#M214858</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-25T07:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Performance fields/stats/table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618215#M214859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I agree with you, only someone from Splunk can answer to your question.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 08:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618215#M214859</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-25T08:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Performance fields/stats/table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618292#M214885</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did some tests and looking at Job inspector phase0 for litsearch, it tells what is going one&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so with the basic search&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=x
| table rulename
| stats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Job inspector reports&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;litsearch index=x | ifields + rulename | addinfo type=count label=prereport_events track_fieldmeta_events=true | fields keepcolorder=t "prestats_reserved_*" "psrsvd_*" "rulename" | prestats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;replacing table with fields gives&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;litsearch index=x | fields + rulename | addinfo type=count label=prereport_events track_fieldmeta_events=true | fields keepcolorder=t "prestats_reserved_*" "psrsvd_*" "rulename" | prestats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;and with neither, you get&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;litsearch index=x | addinfo type=count label=prereport_events track_fieldmeta_events=true | fields keepcolorder=t "prestats_reserved_*" "psrsvd_*" "rulename" | prestats count by rulename&lt;/LI-CODE&gt;&lt;P&gt;so, very minor differences, but all doing prestats and returning only the restricted field list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 22:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618292#M214885</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-25T22:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Performance fields/stats/table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618306#M214892</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;what'd the different job time in the different searches?&lt;/P&gt;&lt;P&gt;As I said the main difference I found is between fields and neither when there are many events and many fields, otherwise I found little differences and I usually don't use it.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 06:00:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618306#M214892</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-26T06:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Performance fields/stats/table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618307#M214893</link>
      <description>&lt;P&gt;job time variation was insignificant - but I'm not testing it on a large data set or with index clustering - I'll do that at some point&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 06:03:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Performance-fields-stats-table/m-p/618307#M214893</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-26T06:03:37Z</dc:date>
    </item>
  </channel>
</rss>

