语言

你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

ManagedInstanceResource.GetTopQueries Method

Definition

Get top resource consuming queries of a managed instance.

  • Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries.
  • Operation Id. : ManagedInstances_ListByManagedInstance.
  • Default Api Version. : 2026-08-01-preview.
  • Resource. : ManagedInstanceResource.
public virtual Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries> GetTopQueries(int? numberOfQueries = default, string databases = default, string startTime = default, string endTime = default, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default, Azure.ResourceManager.Sql.Models.AggregationFunctionType? aggregationFunction = default, Azure.ResourceManager.Sql.Models.SqlMetricType? observationMetric = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetTopQueries : Nullable<int> * string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * Nullable<Azure.ResourceManager.Sql.Models.AggregationFunctionType> * Nullable<Azure.ResourceManager.Sql.Models.SqlMetricType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries>
override this.GetTopQueries : Nullable<int> * string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * Nullable<Azure.ResourceManager.Sql.Models.AggregationFunctionType> * Nullable<Azure.ResourceManager.Sql.Models.SqlMetricType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.TopQueries>
Public Overridable Function GetTopQueries (Optional numberOfQueries As Nullable(Of Integer) = Nothing, Optional databases As String = Nothing, Optional startTime As String = Nothing, Optional endTime As String = Nothing, Optional interval As Nullable(Of QueryTimeGrainType) = Nothing, Optional aggregationFunction As Nullable(Of AggregationFunctionType) = Nothing, Optional observationMetric As Nullable(Of SqlMetricType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of TopQueries)

Parameters

numberOfQueries
Nullable<Int32>

How many 'top queries' to return. Default is 5.

databases
String

Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified.

startTime
String

Start time for observed period.

endTime
String

End time for observed period.

interval
Nullable<QueryTimeGrainType>

The time step to be used to summarize the metric values. Default value is PT1H.

aggregationFunction
Nullable<AggregationFunctionType>

Aggregation function to be used, default value is 'sum'.

observationMetric
Nullable<SqlMetricType>

Metric to be used for ranking top queries. Default is 'cpu'.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of TopQueries that may take multiple service requests to iterate over.

Applies to