<?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: What is the difference between the metasearch and tstats commands? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247210#M73746</link>
    <description>&lt;P&gt;Adding to that, &lt;CODE&gt;metasearch&lt;/CODE&gt; is often around two orders of magnitude slower than &lt;CODE&gt;tstats&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;This takes 0.23 seconds on my PC: &lt;CODE&gt;| tstats count where index=_internal by source&lt;/CODE&gt;&lt;BR /&gt;
This takes 29.4 seconds: &lt;CODE&gt;| metasearch index=_internal | stats count by source&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;One thing &lt;CODE&gt;metasearch&lt;/CODE&gt; can do that &lt;CODE&gt;tstats&lt;/CODE&gt; can't: Discovery of indexed fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metasearch index=_internal | fieldsummary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;tstats&lt;/CODE&gt; forces you to &lt;CODE&gt;stats&lt;/CODE&gt; your data, while not allowing something like &lt;CODE&gt;values(*)&lt;/CODE&gt; to peek into unknown data.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Aug 2016 22:34:45 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2016-08-25T22:34:45Z</dc:date>
    <item>
      <title>What is the difference between the metasearch and tstats commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247208#M73744</link>
      <description>&lt;P&gt;I've been using tstats for most of the use cases that metasearch covers, and so I'm interested in what metasearch can do that tstats can't. From my reading of the documentation, it seems that metasearch is a subset of the capability of tstats (i.e. tstats can search over accelerated datamodels).&lt;/P&gt;

&lt;P&gt;Am I missing anything?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 21:07:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247208#M73744</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2016-08-25T21:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between the metasearch and tstats commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247209#M73745</link>
      <description>&lt;P&gt;No.. that's pretty much it. metasearch was older way to query tsidx data (metadata fields). The tstats command is  advanced/improved form of metasearch.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 21:11:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247209#M73745</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-25T21:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between the metasearch and tstats commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247210#M73746</link>
      <description>&lt;P&gt;Adding to that, &lt;CODE&gt;metasearch&lt;/CODE&gt; is often around two orders of magnitude slower than &lt;CODE&gt;tstats&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;This takes 0.23 seconds on my PC: &lt;CODE&gt;| tstats count where index=_internal by source&lt;/CODE&gt;&lt;BR /&gt;
This takes 29.4 seconds: &lt;CODE&gt;| metasearch index=_internal | stats count by source&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;One thing &lt;CODE&gt;metasearch&lt;/CODE&gt; can do that &lt;CODE&gt;tstats&lt;/CODE&gt; can't: Discovery of indexed fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metasearch index=_internal | fieldsummary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;tstats&lt;/CODE&gt; forces you to &lt;CODE&gt;stats&lt;/CODE&gt; your data, while not allowing something like &lt;CODE&gt;values(*)&lt;/CODE&gt; to peek into unknown data.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 22:34:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247210#M73746</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-08-25T22:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between the metasearch and tstats commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247211#M73747</link>
      <description>&lt;P&gt;The two are operators on a different level. &lt;BR /&gt;
tstats -- all about stats. It does this based on fields encoded in the tsidx files. You can use this to result in rudimentary searches by just reducing the question you are asking to stats. It is however a reporting level command and is designed to result in statistics.&lt;/P&gt;

&lt;P&gt;metasearch -- this actually uses the base search operator in a special mode where we do not read from the journal.gz. So this is an event based command. We actually treat things as events. Due to the fact that we are not reading form the journal.gz this can only use information that exists in the tsidx files. &lt;/P&gt;

&lt;P&gt;Thus they are both tsidx based, however one is based on events and the other is based on statistics as a base object type.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 23:50:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247211#M73747</guid>
      <dc:creator>cpride_splunk</dc:creator>
      <dc:date>2016-08-25T23:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between the metasearch and tstats commands?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247212#M73748</link>
      <description>&lt;P&gt;thanks Martin! That fieldsummary bit is a good point.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2016 13:46:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-difference-between-the-metasearch-and-tstats/m-p/247212#M73748</guid>
      <dc:creator>muebel</dc:creator>
      <dc:date>2016-08-29T13:46:17Z</dc:date>
    </item>
  </channel>
</rss>

