对 ADXTableUsageStatistics 表的查询

按查询数排序的表使用情况

按查询数排序的前 10 个使用表。

ADXTableUsageStatistics
//| parse _ResourceId with * "providers/microsoft.kusto/clusters/" cluster_name // Uncomment to get the cluster name from the ResourceId string
//| where cluster_name == '<Your cluster name filter>'
//| where DatabaseName == '<Your database name filter>'
| summarize Count=count() by TableName, DatabaseName
| top 10 by Count desc
| order by Count desc

按应用程序排序的表使用情况

前 10 个已用表 (应用程序) 查询数最多。

ADXTableUsageStatistics 
//| parse _ResourceId with * "providers/microsoft.kusto/clusters/" cluster_name // Uncomment to get the cluster name from the ResourceId string
//| where cluster_name == '<Your cluster name filter>'
//| where DatabaseName == '<Your database name filter>'
| summarize Count=count() by TableName, DatabaseName, ApplicationName
| top 10 by Count desc
| order by Count desc

扫描的表数据 - 最长时间窗口

前 10 个数据扫描回溯时间窗口。

ADXTableUsageStatistics 
//| parse _ResourceId with * ""providers/microsoft.kusto/clusters/"" cluster_name // Uncomment to get the cluster name from the ResourceId string
//| where cluster_name == '<Your cluster name filter>'
//| where DatabaseName == '<Your database name filter>'
//| where TableName == '<Your table name filter>'
| extend TotalTime = (MaxCreatedOn - MinCreatedOn)
| top 10 by TotalTime desc
| order by TotalTime desc
| project TimeGenerated, TotalTime, TableName, DatabaseName, MinCreatedOn, MaxCreatedOn, ApplicationName

扫描的表数据 - 排名靠前的表

按表扫描回溯时间窗口的前 10 个数据。

ADXTableUsageStatistics 
//| parse _ResourceId with * ""providers/microsoft.kusto/clusters/"" cluster_name // Uncomment to get the cluster name from the ResourceId string
//| where cluster_name == '<Your cluster name filter>'
//| where DatabaseName == '<Your database name filter>'
//| where TableName == '<Your table name filter>'
| extend TotalTime = (MaxCreatedOn - MinCreatedOn)
| summarize arg_max(TotalTime, *) by TableName
| order by TotalTime desc
| project TimeGenerated, TotalTime, TableName, DatabaseName, MinCreatedOn, MaxCreatedOn, ApplicationName