4 Query the details of an Optimization
Description: Query the details of an optimization using optimization ID (analysisId).
4.1. Interface URL
Post http://${server-host}:${server-port}/api/v1/getStatementDetails
4.2. Request Parameters
Field | Type | Required | Description |
---|---|---|---|
userKey | String | Y | Activation code |
analysisStmtId | String | Y | Statement ID (analysisStmtId) returned when querying optimization details |
Request Example
{
"userKey": "CB698418-88B25371-67F15F01-XXXXXXXX",
"analysisStmtId": "1730503078953304065"
}
4.3. Response
Field | Type | Description |
---|---|---|
code | int | Status code |
message | String | Description |
data | Object | Data |
Data structure of data
Field | Type | Description |
---|---|---|
analysisId | String | Optimization ID corresponding to the statement |
analysisName | String | Optimization name corresponding to the statement |
statementName | String | Statement name |
stmtText | String | Statement SQL text |
detailMarkdown | String | Statement optimization detail markdown information |
indexRecommended | Array | Recommended index list |
rewrittenQuery | Array | Rewritten query list |
ruleCode | String | Rule code |
ruleNameZh | String | Rule Chinese name |
ruleNameEn | String | Rule English name |
rewrittenQueriesStr | String | JSON string of SQL snippets that violate rewrite rules |
violatedQueriesStr | String | JSON string of SQL snippets that violate check rules |
violationRule | Array | Statement violated check rule list |
validationDetails | Object | Validate operation details |
beforeCost | double | Cost before optimization |
afterCost | double | Cost after optimization |
beforePlan | String | Execution plan before optimization |
afterPlan | String | Execution plan after optimization |
performImprovePer | String | Statement performance improvement percentage |
Response Example
{
"resultCode": 200,
"resultMsg": "Success",
"resultBody": {
"analysisId": "1730522723395497986",
"analysisName": "api-20231201174223",
"stmtId": "1730522775618777090",
"statementName": "Query-1",
...
}
}