當不再需要使用Lastpoint索引擷取時序表中各時間軸的最新時間點時,您可以使用DeleteTimeseriesLastpointIndex介面刪除Lastpoint索引。
注意事項
Tablestore Go SDK v1.7.15 及以上版本支援 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)
}
}