當不再需要使用Lastpoint索引擷取時序表中各時間軸的最新時間點時,您可以使用DeleteTimeseriesLastpointIndex介面刪除Lastpoint索引。
注意事項
Table StoreGo SDK從v1.7.15版本開始支援Lastpoint索引功能。使用該功能時,請確保擷取了正確的Go SDK版本。
刪除Lastpoint索引前,請確保相應Lastpoint索引未在實際業務中使用。
Lastpoint索引刪除後不可恢複,請謹慎操作。
前提條件
已建立Lastpoint索引。具體操作,請參見建立Lastpoint索引。
已初始化TimeseriesClient。具體操作,請參見初始化Tablestore Client。
參數
參數 | 說明 |
timeseriesTableName | 時序表名稱。 |
lastpointIndexName | Lastpoint索引名稱。 |
樣本
以下樣本刪除timeseries_table時序表下的Lastpoint索引last_point_index。
func deleteTimeseriesLastpointIndex(client *tablestore.TimeseriesClient) {
request := tablestore.NewDeleteTimeseriesLastpointIndexRequest("test_timeseries_table", "last_point_index")
_, err := client.DeleteTimeseriesLastpointIndex(request)
if err != nil {
log.Fatal(err)
}
}