Skip to content

Commit be59beb

Browse files
authored
Merge pull request #105670 from bwren/am-query-optimize
Azure Monitor query optimization
2 parents 70c240c + b088976 commit be59beb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/azure-monitor/log-query/query-optimization.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ The following query performance indicators are available for every query that is
3434

3535
- [Total CPU](#total-cpu): Overall compute used to process the query across all compute nodes. It represents time used for computing, parsing, and data fetching.
3636

37-
- [Data volume](#data-volume): Overall data that was accessed to process the query. Influenced by the size of the target table, time span used, filters applied, and the number of columns referenced.
37+
- [Data used for processed query](#data-used-for-processed-query): Overall data that was accessed to process the query. Influenced by the size of the target table, time span used, filters applied, and the number of columns referenced.
3838

39-
- [Time range](#time-range): The gap between the newest and the oldest data that was accessed to process the query. Influenced by the explicit time range specified for the query.
39+
- [Time span of the processed query](#time-span-of-the-processed-query): The gap between the newest and the oldest data that was accessed to process the query. Influenced by the explicit time range specified for the query.
4040

41-
- [Age of data](#age-of-data): The gap between now and the oldest data that was accessed to process the query. It highly influences the efficiency of data fetching.
41+
- [Age of processed data](#age-of-processed-data): The gap between now and the oldest data that was accessed to process the query. It highly influences the efficiency of data fetching.
4242

4343
- [Number of workspaces](#number-of-workspaces): How many workspaces were accessed during the query processing due to implicit or explicit selection.
4444

@@ -147,7 +147,7 @@ Heartbeat
147147
> This indicator presents only CPU from the immediate cluster. In multi-region query, it would represent only one of the regions. In multi-workspace query, it might not include all workspaces.
148148
149149

150-
## Data volume
150+
## Data used for processed query
151151

152152
A critical factor in the processing of the query is the volume of data that is scanned and used for the query processing. Azure Data Explorer uses aggressive optimizations that dramatically reduce the data volume compared to other data platforms. Still, there are critical factors in the query that can impact the data volume that is used.
153153
In Azure Monitor Logs, the **TimeGenerated** column is used as a way to index the data. Restricting the **TimeGenerated** values to as narrow a range as possible will make a significant improvement to query performance by significantly limiting the amount of data that has to be processed.
@@ -205,7 +205,7 @@ SecurityEvent
205205
| summarize count(), dcount(EventID), avg(Level) by Computer
206206
```
207207

208-
## Time range
208+
## Time span of the processed query
209209

210210
All logs in Azure Monitor Logs are partitioned according to the **TimeGenerated** column. The number of partitions that are accessed are directly related to the time span. Reducing the time range is the most efficient way of assuring a prompt query execution.
211211

@@ -258,7 +258,7 @@ by Computer
258258
> [!IMPORTANT]
259259
> This indicator isn't available for cross region queries.
260260
261-
## Age of data
261+
## Age of processed data
262262
Azure Data Explorer uses several storage tiers: in-memory, local SSD disks and much slower Azure Blobs. The newer the data, the higher is the chance that it is stored in a more performant tier with smaller latency, reducing the query duration and CPU. Other than the data itself, the system also has a cache for metadata. The older the data, the less chance its metadata will be in cache.
263263

264264
While some queries require usage of old data, there are cases where old data is used by mistake. This happens when queries are executed without providing time range in their meta-data and not all table references include filter on the **TimeGenerated** column. In these cases, the system will scan all the data that is stored in that table. When the data retention is long, it can cover long time ranges and thus data that is as old as the data retention period.

0 commit comments

Comments
 (0)