top_query_statistics
Creates, updates, deletes, gets or lists a top_query_statistics resource.
Overview
| Name | top_query_statistics |
| Type | Resource |
| Id | azure_extras.rdbms.top_query_statistics |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_server
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long |
name | string | The name of the resource. |
aggregationFunction | string | Aggregation function name. |
databaseNames | array | The list of database names. |
endTime | string (date-time) | Observation end time. |
metricDisplayName | string | Metric display name. |
metricName | string | Metric name. |
metricValue | number | Metric value. |
metricValueUnit | string | Metric value unit. |
queryExecutionCount | integer | Number of query executions in this time interval. |
queryId | string | Database query identifier. |
startTime | string (date-time) | Observation start time. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long |
name | string | The name of the resource. |
aggregationFunction | string | Aggregation function name. |
databaseNames | array | The list of database names. |
endTime | string (date-time) | Observation end time. |
metricDisplayName | string | Metric display name. |
metricName | string | Metric name. |
metricValue | number | Metric value. |
metricValueUnit | string | Metric value unit. |
queryExecutionCount | integer | Number of query executions in this time interval. |
queryId | string | Database query identifier. |
startTime | string (date-time) | Observation start time. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, server_name, query_statistic_id, subscription_id | Retrieve the query statistic for specified identifier. | |
list_by_server | select | resource_group_name, server_name, subscription_id | Retrieve the Query-Store top queries for specified metric and aggregation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
query_statistic_id | string | The Query Statistic identifier. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
server_name | string | The name of the server. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_server
Retrieve the query statistic for specified identifier.
SELECT
id,
name,
aggregationFunction,
databaseNames,
endTime,
metricDisplayName,
metricName,
metricValue,
metricValueUnit,
queryExecutionCount,
queryId,
startTime,
type
FROM azure_extras.rdbms.top_query_statistics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND query_statistic_id = '{{ query_statistic_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Retrieve the Query-Store top queries for specified metric and aggregation.
SELECT
id,
name,
aggregationFunction,
databaseNames,
endTime,
metricDisplayName,
metricName,
metricValue,
metricValueUnit,
queryExecutionCount,
queryId,
startTime,
type
FROM azure_extras.rdbms.top_query_statistics
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;