Delen via


ManagedDatabaseResource.GetQueryStatistics Method

Definition

Get query execution statistics by query id.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/queries/{queryId}/statistics
  • Operation Id: ManagedDatabaseQueries_ListByQuery
  • Default Api Version: 2020-11-01-preview
public virtual Azure.Pageable<Azure.ResourceManager.Sql.Models.QueryStatistics> GetQueryStatistics (string queryId, string startTime = default, string endTime = default, Azure.ResourceManager.Sql.Models.QueryTimeGrainType? interval = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetQueryStatistics : string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.QueryStatistics>
override this.GetQueryStatistics : string * string * string * Nullable<Azure.ResourceManager.Sql.Models.QueryTimeGrainType> * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.Models.QueryStatistics>
Public Overridable Function GetQueryStatistics (queryId As String, Optional startTime As String = Nothing, Optional endTime As String = Nothing, Optional interval As Nullable(Of QueryTimeGrainType) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of QueryStatistics)

Parameters

queryId
String

The String to use.

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.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

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

Exceptions

queryId is an empty string, and was expected to be non-empty.

queryId is null.

Applies to