Skip to main content

top_query_statistics

Creates, updates, deletes, gets or lists a top_query_statistics resource.

Overview

Nametop_query_statistics
TypeResource
Idazure_extras.rdbms.top_query_statistics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long
namestringThe name of the resource.
aggregationFunctionstringAggregation function name.
databaseNamesarrayThe list of database names.
endTimestring (date-time)Observation end time.
metricDisplayNamestringMetric display name.
metricNamestringMetric name.
metricValuenumberMetric value.
metricValueUnitstringMetric value unit.
queryExecutionCountintegerNumber of query executions in this time interval.
queryIdstringDatabase query identifier.
startTimestring (date-time)Observation start time.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, server_name, query_statistic_id, subscription_idRetrieve the query statistic for specified identifier.
list_by_serverselectresource_group_name, server_name, subscription_idRetrieve 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.

NameDatatypeDescription
query_statistic_idstringThe Query Statistic identifier. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
server_namestringThe name of the server. Required.
subscription_idstring

SELECT examples

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
;