Skip to main content

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

FieldTypeRequiredDescription
userKeyStringYActivation code
analysisStmtIdStringYStatement ID (analysisStmtId) returned when querying optimization details

Request Example

{  
"userKey": "CB698418-88B25371-67F15F01-XXXXXXXX",
"analysisStmtId": "1730503078953304065"
}

4.3. Response

FieldTypeDescription
codeintStatus code
messageStringDescription
dataObjectData

Data structure of data

FieldTypeDescription
analysisIdStringOptimization ID corresponding to the statement
analysisNameStringOptimization name corresponding to the statement
statementNameStringStatement name
stmtTextStringStatement SQL text
detailMarkdownStringStatement optimization detail markdown information
indexRecommendedArrayRecommended index list
rewrittenQueryArrayRewritten query list
ruleCodeStringRule code
ruleNameZhStringRule Chinese name
ruleNameEnStringRule English name
rewrittenQueriesStrStringJSON string of SQL snippets that violate rewrite rules
violatedQueriesStrStringJSON string of SQL snippets that violate check rules
violationRuleArrayStatement violated check rule list
validationDetailsObjectValidate operation details
beforeCostdoubleCost before optimization
afterCostdoubleCost after optimization
beforePlanStringExecution plan before optimization
afterPlanStringExecution plan after optimization
performImprovePerStringStatement performance improvement percentage

Response Example

{  
"resultCode": 200,
"resultMsg": "Success",
"resultBody": {
"analysisId": "1730522723395497986",
"analysisName": "api-20231201174223",
"stmtId": "1730522775618777090",
"statementName": "Query-1",
...
}
}