擷取查詢Profile分析資訊。
介面說明
推薦您使用可視化介面執行查詢並擷取 QueyID。具體操作,請參見查詢審計。
版本限制
-
不支援 3.0 版本。
-
不支援建立日期在 2025-08-01 前的執行個體,若有需要,請聯絡工單支援。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| DBInstanceId |
string |
是 |
執行個體 ID。 |
selectdb-cn-7213cjv**** |
| RegionId |
string |
是 |
地區 ID。 |
cn-beijing |
| QueryId |
string |
否 |
查詢 ID。 |
sq202510231018sh3b69ad10014154 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
PlainResponse |
||
| RequestId |
string |
請求 ID。 |
F8900A96-67F7-5274-A41B-7722E1ECF8C9 |
| Profile |
string |
Profile 文本,暫未支援。 |
No Demo |
| ProfileSummary |
any |
Profile 摘要總結。 |
{ "summary": { "workloadGroup": "normal", "totalTime": "16ms", "totalTimeMs": 16, "state": "OK", "queryId": "8c7776d539f2426b-b0b654c7acc9bf8f", "sql": "SELECT * FROM demo_db.user_info WHERE status = 1" }, "operators": [ { "pipeline": 0, "frag": 0, "skewRatio": 1, "name": "RESULT_SINK_OPERATOR", "timePct": 0.34, "inputRows": 4, "execTimeAvgMs": 0.05 }, { "pipeline": 0, "frag": 0, "name": "OLAP_SCAN_OPERATOR(nereids_id=84. table_name=user_info(user_info))", "timePct": 0, "runtimeFilters": [ "RuntimeFilterInfo: sum , avg , max , min" ], "execTimeAvgMs": 0, "table": "demo_db.user_info" } ], "queryStats": { "blockedOperators": 0, "operatorCount": 2, "spilledOperators": 0, "fragmentCount": 2 }, "fragments": [ { "pipelines": 1, "instances": 1, "execTimeMs": 0.05, "id": 0 }, { "pipelines": 0, "instances": 0, "execTimeMs": 0, "id": 0 } ], "timeBreakdown": { "schedule": "4ms", "parseSql": "1ms", "nereidsAnalysis": "1ms", "waitFetchResult": "5ms", "fetchResult": "1ms", "nereidsOptimize": "N/A", "plan": "6ms", "nereidsRewrite": "1ms" }, "scannedTables": { "demoDb.userInfo": { "totalSizeGb": 0, "totalRows": 5, "tabletSkew": 1.6, "ddl": "CREATE TABLE `user_info` xxx", "tablets": 8 } } } |
樣本
正常返回樣本
JSON格式
{
"RequestId": "F8900A96-67F7-5274-A41B-7722E1ECF8C9",
"Profile": "No Demo",
"ProfileSummary": "{\n \"summary\": {\n \"workloadGroup\": \"normal\",\n \"totalTime\": \"16ms\",\n \"totalTimeMs\": 16,\n \"state\": \"OK\",\n \"queryId\": \"8c7776d539f2426b-b0b654c7acc9bf8f\",\n \"sql\": \"SELECT * FROM demo_db.user_info WHERE status = 1\"\n },\n \"operators\": [\n {\n \"pipeline\": 0,\n \"frag\": 0,\n \"skewRatio\": 1,\n \"name\": \"RESULT_SINK_OPERATOR\",\n \"timePct\": 0.34,\n \"inputRows\": 4,\n \"execTimeAvgMs\": 0.05\n },\n {\n \"pipeline\": 0,\n \"frag\": 0,\n \"name\": \"OLAP_SCAN_OPERATOR(nereids_id=84. table_name=user_info(user_info))\",\n \"timePct\": 0,\n \"runtimeFilters\": [\n \"RuntimeFilterInfo: sum , avg , max , min\"\n ],\n \"execTimeAvgMs\": 0,\n \"table\": \"demo_db.user_info\"\n }\n ],\n \"queryStats\": {\n \"blockedOperators\": 0,\n \"operatorCount\": 2,\n \"spilledOperators\": 0,\n \"fragmentCount\": 2\n },\n \"fragments\": [\n {\n \"pipelines\": 1,\n \"instances\": 1,\n \"execTimeMs\": 0.05,\n \"id\": 0\n },\n {\n \"pipelines\": 0,\n \"instances\": 0,\n \"execTimeMs\": 0,\n \"id\": 0\n }\n ],\n \"timeBreakdown\": {\n \"schedule\": \"4ms\",\n \"parseSql\": \"1ms\",\n \"nereidsAnalysis\": \"1ms\",\n \"waitFetchResult\": \"5ms\",\n \"fetchResult\": \"1ms\",\n \"nereidsOptimize\": \"N/A\",\n \"plan\": \"6ms\",\n \"nereidsRewrite\": \"1ms\"\n },\n \"scannedTables\": {\n \"demoDb.userInfo\": {\n \"totalSizeGb\": 0,\n \"totalRows\": 5,\n \"tabletSkew\": 1.6,\n \"ddl\": \"CREATE TABLE `user_info` xxx\",\n \"tablets\": 8\n }\n }\n }"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | DocumentConvertFailed.ExceedFileSizeLimit | The conversion has been failed, exceed file size limit. | 文檔轉換失敗,檔案大小超過系統限額。 |
| 400 | Forbidden | User not authorized to operate on the specified resource, or this API does not support RAM. | 子帳號許可權不足,請先擷取授權。 |
| 400 | InvalidDBName | The specified database name is not allowed. | 資料庫名稱不符合要求,請確認資料名稱是否正確。 |
| 400 | CreateOrderFailed | Failed to create order. | 建立訂單失敗。 |
| 400 | InvalidDBInstanceId.Malformed | The specified parameter "DBInstanceId" is not valid. | 參數"DBInstanceId"不合法。 |
| 400 | InvalidParameter | Specified parameter is not valid. | 指定的參數無效。 |
| 400 | InvalidParameter.QueryId | Specified parameters is not valid. | 指定的參數無效。 |
| 403 | DBClusterNotSupported | The requested operation can not be performed while the cluster is not sale. | 當叢集未運行時,無法執行請求的操作。 |
| 403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | 當前執行個體狀態不支援此操作。 |
| 403 | InstanceEngineType.NotSupport | The instance engine and type does not support operations. | 操作失敗,執行個體引擎和類型不支援該操作。 |
| 403 | InvalidDBInstanceState.NotSupport | The specified instance state does't support this operation. | 指定的執行個體狀態不支援此操作。 |
| 403 | MoneyLessThan100 | The Account Monet less Than 100. | 當前阿里雲帳號餘額不足100,請儲值。 |
| 403 | OperationDenied.DBNameAndAccountPrivilegeCount | The operation is not permitted due to count of database or account privilege. | 操作失敗,資料庫與許可權的數量不一致。 |
| 403 | InsufficientResourceCapacity | The resource is out of usage. | 資源不足,請您稍後再試。 |
| 403 | IncorrectMinorVersion | Current engine minor version does not support operations. | 當前核心小版本不支援此操作。 |
| 403 | IncorrectEngineVersion | Current engine version does not support operations. | 目前的版本不支援此操作。 |
| 404 | DBInstanceLocked | The current instance lock mode does not support this operation. | 操作失敗,當前執行個體鎖定。 |
| 404 | IncorrectVswitchId | The specified parameter VSwitchId is not valid. | 交換器參數無效。 |
| 404 | InvalidApi.NotFound | Specified api is not found, please check your url and method. | |
| 404 | InvalidDBInstance.NotFound | The specified instance is not found. | 沒有找到指定的執行個體,請檢查執行個體的正確性。 |
| 404 | InvalidDBInstanceClass.NotFound | The specified instance classic does not exist. | 當前選擇的配置或規格不存在或已停售,請重新選擇。 |
| 404 | InvalidRegionId.NotFound | The provided RegionId does not exist in our records. | 操作失敗,輸入的地區及可用性區域不存在。 |
| 404 | QueryPrice.Failed | The inquiry failed. Contact Alibaba Cloud customer service representatives. | 詢價失敗,請聯絡客服同學。 |
| 404 | InvalidDBInstanceId.NotFound | The DBInstanceId provided does not exist in our records. | SelectDB執行個體不存在。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。