Query Statistics - List By Query
列出查詢的統計數據。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/topQueries/{queryId}/statistics?api-version=2014-04-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
database
|
path | True |
string |
資料庫的名稱。 |
|
query
|
path | True |
string |
查詢的識別碼 |
|
resource
|
path | True |
string |
包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。 |
|
server
|
path | True |
string |
伺服器的名稱。 |
|
subscription
|
path | True |
string |
識別 Azure 訂用帳戶的訂用帳戶標識碼。 |
|
api-version
|
query | True |
string |
要用於要求的 API 版本。 |
回應
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
還行 |
範例
Get a query
範例要求
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/sqlcrudtest/databases/db1/topQueries/19/statistics?api-version=2014-04-01
範例回覆
{
"value": [
{
"queryId": "19",
"intervals": [
{
"intervalStartTime": "2017-07-11T16:00:00",
"executionCount": 12,
"metrics": [
{
"name": "cpu",
"displayName": "Cpu",
"unit": "percentage",
"value": 0.000763888888888889
},
{
"name": "io",
"displayName": "Physical Io Reads",
"unit": "percentage",
"value": 0
},
{
"name": "logIo",
"displayName": "Log Writes",
"unit": "percentage",
"value": 0
},
{
"name": "memory",
"displayName": "Memory consumption",
"unit": "KB",
"value": 0
},
{
"name": "duration",
"displayName": "Query duration",
"unit": "microseconds",
"value": 3308
}
]
}
]
}
]
}
定義
| 名稱 | Description |
|---|---|
|
Query |
資料庫查詢。 |
|
Query |
資料庫查詢。 |
|
Query |
測量單位 |
|
Query |
資料庫查詢。 |
|
Query |
表示取得查詢要求的回應。 |
QueryInterval
資料庫查詢。
| 名稱 | 類型 | Description |
|---|---|---|
| executionCount |
number (int32) |
此間隔期間執行查詢的次數。 |
| intervalStartTime |
string (date-time) |
測量間隔的開始時間(ISO8601格式)。 |
| metrics |
此間隔期間的查詢計量清單。 |
QueryMetric
資料庫查詢。
| 名稱 | 類型 | Description |
|---|---|---|
| displayName |
string |
要顯示在使用者介面中的計量名稱 |
| name |
string |
計量的名稱 |
| unit |
測量單位 |
|
| value |
number (double) |
測量值 |
QueryMetricUnit
測量單位
| 值 | Description |
|---|---|
| percentage | |
| KB | |
| microseconds |
QueryStatistic
資料庫查詢。
| 名稱 | 類型 | Description |
|---|---|---|
| intervals |
查詢間隔的清單。 |
|
| queryId |
string |
查詢的識別碼 |
QueryStatisticListResult
表示取得查詢要求的回應。
| 名稱 | 類型 | Description |
|---|---|---|
| value |
查詢。 |