<?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: Filtering high-cardinality timeseries data by value in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295584#M3190</link>
    <description>&lt;P&gt;This query will act in similar way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { TPS=avg(TPS_BY_DIMENSION), TPS_MAX=max(TPS_BY_DEMNSION, scalar: true) }, interval:1m, by: {dimension} 
| filter TPS_MAX &amp;gt; 10&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you explain what do you mean exactly "&lt;SPAN&gt;very-high-cardinality timeseries?. Dynatrace metrics are not designed to deal with &lt;STRONG&gt;&lt;EM&gt;high cardinality dimensions (dimension tuples)&lt;/EM&gt;&lt;/STRONG&gt;, which may result in incomplete queries.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Mar 2026 22:14:20 GMT</pubDate>
    <dc:creator>krzysztof_hoja</dc:creator>
    <dc:date>2026-03-03T22:14:20Z</dc:date>
    <item>
      <title>Filtering high-cardinality timeseries data by value</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295573#M3187</link>
      <description>&lt;P&gt;Hey all.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have very-high-cardinality timeseries data that I send over to Dynatrace. To prevent the dashboard tiles from crashing and to allow alerting workflows to complete in a timely manner, I use iAny filter statements like "timeseries TPS=avg(TPS_BY_DIMENSION), interval:1m, by: dimension | filter iAny(TPS[] &amp;gt; 10)" to only account for larger and more relevant metrics without filtering directly for specific dimension values. The issue is that iAny is rather slow as it has to scan each and every timeseries by value rather than just once by dimension key like contains() for instance would do, and allows timeseries with just one high value to be admitted into my results. I wonder if other DQL exists that better addresses my need, though I doubt it given all timeseries values would realistically have to be scanned.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 16:39:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295573#M3187</guid>
      <dc:creator>Rudolph_Sedlin</dc:creator>
      <dc:date>2026-03-03T16:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering high-cardinality timeseries data by value</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295584#M3190</link>
      <description>&lt;P&gt;This query will act in similar way:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries { TPS=avg(TPS_BY_DIMENSION), TPS_MAX=max(TPS_BY_DEMNSION, scalar: true) }, interval:1m, by: {dimension} 
| filter TPS_MAX &amp;gt; 10&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you explain what do you mean exactly "&lt;SPAN&gt;very-high-cardinality timeseries?. Dynatrace metrics are not designed to deal with &lt;STRONG&gt;&lt;EM&gt;high cardinality dimensions (dimension tuples)&lt;/EM&gt;&lt;/STRONG&gt;, which may result in incomplete queries.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 22:14:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295584#M3190</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2026-03-03T22:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering high-cardinality timeseries data by value</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295614#M3193</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In practice the most reliable and typically faster alternative to iAny() is to compute a per-series “gate” as a scalar derived from the already computed timeseries array. iAny(TPS[] &amp;gt; 10) is expensive because it scans the value array for every series and it also admits series with a single spike. Instead I do:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries TPS = sum(dt.service.request.count, rate: 1m),
  from: -2h, interval: 1m, by: {endpoint.name}
| fieldsAdd TPS_MAX = arrayMax(TPS)
| filter TPS_MAX &amp;gt; 10
| sort TPS_MAX desc
| limit 20&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scalar1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32193iBC9D9A9607D63F75/image-size/large?v=v2&amp;amp;px=999" role="button" title="scalar1.jpg" alt="scalar1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This filters on one number per series (max over the full window), without iAny().&lt;/P&gt;&lt;P&gt;I also tested what krzysztof&amp;nbsp;suggest. The scalar:true variant&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries {
  TPS     = sum(dt.service.request.count, rate: 1m),
  TPS_MAX = max(dt.service.request.count, rate: 1m, scalar: true)
}, from: -2h, interval: 1m, by: {endpoint.name}
| filter TPS_MAX &amp;gt; 10&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scalar_empty.jpg" style="width: 930px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32194i71C0611AEC8A5FEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="scalar_empty.jpg" alt="scalar_empty.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;…but in my environment it returned 0 records, while arrayMax(TPS) worked correctly. It seems scalar:true doesn’t always bind to the by:{...} series as expected (TPS_MAX ends up NULL per series), so filtering removes everything.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 11:34:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295614#M3193</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2026-03-04T11:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering high-cardinality timeseries data by value</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295630#M3197</link>
      <description>&lt;P&gt;The reason is different.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;iAny&lt;/EM&gt;&lt;/STRONG&gt; as well as &lt;EM&gt;&lt;STRONG&gt;arrayMax&lt;/STRONG&gt;&lt;/EM&gt; work on the already calculated results. What I proposed work on detailed data picking max from detailed timeseries.&amp;nbsp;&lt;BR /&gt;It will work identical for timeseries when all available (meaningful)&amp;nbsp; dimensions are listed in &lt;EM&gt;&lt;STRONG&gt;by:{}&lt;/STRONG&gt;&lt;/EM&gt;. Also when timeseries is aggregated with &lt;EM&gt;&lt;STRONG&gt;avg()&lt;/STRONG&gt;&lt;/EM&gt;, the result may not be very different. But when you use &lt;EM&gt;&lt;STRONG&gt;sum()&lt;/STRONG&gt;&lt;/EM&gt; and have many dimensions like for&amp;nbsp;dt.service.request.count, the results will be way very different.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 12:25:15 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295630#M3197</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2026-03-04T12:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering high-cardinality timeseries data by value</title>
      <link>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295660#M3199</link>
      <description>&lt;P&gt;Pretty much exactly that, while I have some metrics that are low-cardinality, others have hundreds of thousands of metrics each minute due to a high granularity (dimension tuples with many fields) and high throughput, which certainly stresses the Dynatrace metrics ingest and Davis.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Mar 2026 19:06:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Filtering-high-cardinality-timeseries-data-by-value/m-p/295660#M3199</guid>
      <dc:creator>Rudolph_Sedlin</dc:creator>
      <dc:date>2026-03-04T19:06:44Z</dc:date>
    </item>
  </channel>
</rss>

