Overview
You can call this API to query the binding information of an SQL outline. The binding information includes the execution plan, outline ID, and concurrent limit of the SQL statement.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
GET /api/v2/instances/{instanceId}/tenants/{tenantId}/sqls/{sqlId}/outline
Request parameters
Path
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | obcluster-***** |
| tenantId | String | Yes | The ID of the tenant. | t4louaeei**** |
| sqlId | String | Yes | The unique identifier of the SQL statement. | sql_123456789 |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The request ID for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
| tableName | String | No | The table name. | N/A |
| dbName | String | No | The database name. | N/A |
| isConcurrentLimit | Boolean | No | Indicates whether to set a concurrent limit. | N/A |
| dynamicSql | Boolean | No | Indicates whether the SQL statement is dynamic. | N/A |
| formatSqlId | String | No | The ID of the formatted SQL statement. | N/A |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Object | The binding information of the SQL outline. |
| dbindPlan | String | The execution plan. |
| outlineId | String | The ID of the outline. |
| bindIndex | Integer | The binding index. |
| maxConcurrent | Integer | The maximum concurrent limit. |
| tableName | String | The table name. |
| requestId | String | The request ID. |
| success | Boolean | Indicates whether the request was successful. |
Examples
Request example
curl --digest -u '<Your ak:sk>' \
-X GET \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/sqls/{sqlId}/outline?requestId={requestId}' \
-G \
-d 'dbName={dbName}' \
-d 'tableName={tableName}' \
-d 'isConcurrentLimit={isConcurrentLimit}' \
-d 'dynamicSql={dynamicSql}' \
-d 'formatSqlId={formatSqlId}'
Response example
JSON format
{
"data": {
"outlineId": 5******,
"bindIndex": "idx_name_8_1********",
"tableName": "plan_keep_******"
},
"requestId": "d87cedc5-b214-490b-b9c9-fccdb7160218",
"success": true
}
