All Products
Search
Document Center

Tablestore:Query data in a Lastpoint index

Last Updated:Jun 20, 2026

This topic describes how to query data in a Lastpoint index.

Prerequisites

You must have a Lastpoint index for your time series table. For more information, see Create a LastPoint index.

Query methods

Query in the console

  1. Go to the Instance Management page.

    1. Log on to the Tablestore console.

    2. In the top navigation bar, select a resource group and a region.

    3. On the Overview page, click the instance name or click Manage Instance in the Actions column.

  2. Go to the Manage Time Series Table page.

    1. On the Instance Management page, click the Time Series Tables tab.

    2. On the Time Series Tables tab, click the name of the time series table or click Manage Data in the Actions column.

  3. Open the Query Data dialog box.

    On the Basic Information tab, in the Lastpoint index section, click Query in the Actions column of the Lastpoint index.

  4. Use a range search to read all data from the Lastpoint index.

    1. Set Mode to Range Search.

    2. By default, all columns are returned. To specify which attribute columns to return, turn off the All Columns switch and enter the attribute columns.

      Separate multiple attribute columns with a comma (,).

    3. Leave Max Versions at its default value of 10.

      Time series tables do not support the max versions feature.

    4. Use the default Primary Key configuration.

      By default, Start Primary Key Column is set to the minimum value and End Primary Key Column is set to the maximum value.

    5. Set the sort order for the query results. You can select Forward Search or Backward Search.

    6. Click Query.

      The matching data appears in the Lastpoint index section of the Basic Information tab.

Query with SQL

  1. Go to the Instance Management page.

    1. Log on to the Tablestore console.

    2. In the top navigation bar, select a resource group and a region.

    3. On the Overview page, click the instance name or click Manage Instance in the Actions column.

  2. Go to the Manage Time Series Table page.

    1. On the Instance Management page, click the Time Series Tables tab.

    2. On the Time Series Tables tab, click the name of the time series table or click Manage Data in the Actions column.

  3. Create an SQL mapping table for the Lastpoint index.

    1. On the Manage Time Series Table page, click the Query by Executing SQL Statement tab.

    2. On the Query by Executing SQL Statement tab, click the fig_createtablevitural icon.

    3. In the Create Mapping Table dialog box, set the table type to Lastpoint Index, specify the table name and the Lastpoint index, and then click Generate SQL Statement.

      The system automatically generates the SQL statement to create the mapping table.

    4. Click Execute SQL Statement.

  4. Query the data using a SELECT statement.

    Enter the SQL statement in the editor and click Execute SQL Statement.

    The following example shows how to query all data from the Lastpoint index:

    select * from your_lastpoint_name;

SDK integration

You can query data from a Lastpoint index using the following SDKs:

Billing

  • You are not charged for creating a Lastpoint index. However, you are charged for data storage and read operations within the index. For more information, see Billable items of the TimeSeries model.

  • If you use SQL to query data in a Lastpoint index, you are also charged for the SQL queries. For more information, see Billable items of SQL query.

References

  • The SQL query feature is compatible with MySQL syntax and provides a centralized interface to multiple Tablestore data engines. It is ideal for performing efficient, complex queries and online analytics on large volumes of data. For more information, see SQL query.

  • For more flexible query capabilities, such as boolean logic, full-text search, prefix matching, or fuzzy search, create a search index for your Lastpoint index. For more information, see Retrieve a Lastpoint index.

  • To visualize data from a Lastpoint index, you can connect Tablestore to Grafana or DataV. For more information, see Integrate with Grafana or Integrate with DataV-Board 6.0.