调用 DeleteIndex 接口可删除数据表上的指定二级索引。删除后无法恢复。
注意事项
二级索引删除后不可恢复。如需再次使用,请重新创建。
接口
/**
* 删除全局二级索引。
* @api
*
* @param [] $request
* 请求参数,包含数据表名称。
* @return [] 请求返回。
* @throws OTSClientException 当参数检查出错或服务端返回校验错误时抛出异常。
* @throws OTSServerException 当 OTS 服务端返回错误时抛出异常。
* @example "src/examples/DropIndex.php"
*/
public function dropIndex(array $request)
参数
|
参数 |
说明 |
|
table_name |
数据表名称。 |
|
index_name |
索引表名称。 |
示例
以下示例删除指定的二级索引。
$request = array(
'table_name' => '<TABLE_NAME>', // 数据表名称。
'index_name' => '<INDEX_NAME>' // 索引表名称。
);
$otsClient->dropIndex($request);
该文章对您有帮助吗?