Analytical stores provide low-cost, long-term storage and fast analysis for time series data.
Features
Analytical stores are low-cost storage engines designed and optimized by Tablestore for time series scenarios, with efficient data compression and powerful query and analysis capabilities for large-scale data analysis.
Analytical stores automatically synchronize data from time series tables. When the data write rate is stable, synchronization latency is typically within 10 minutes. Under heavy workloads, synchronization latency may increase slightly as the system prioritizes storage stability. Analytical stores operate independently from time series tables. You can set a separate time to live (TTL) for analytical store data, and queries on analytical stores do not affect the read and write performance of time series tables.
The following table lists the supported features.
|
Feature |
Description |
|
Create an analytical store |
Create an analytical store when creating a time series table, or add one to an existing table. Configuration options include TTL and synchronization mode (full or incremental). |
|
Query and analyze data by executing SQL statements |
Execute SQL statements with various conditions and aggregation operations to query and analyze analytical store data. |
|
Query information of an analytical store |
View the configuration, synchronization status, and storage usage of an analytical store. |
|
Update the TTL of an analytical store |
Update the TTL of an analytical store to extend data retention or remove historical data. |
|
Delete an analytical store |
Delete an unused analytical store to reduce storage costs. |
Core benefits
-
Low-cost data storage
-
Hierarchical hot and cold storage: Tablestore uses wide-column stores with hybrid row-column format for hot data and column stores for full historical data.
-
High compression ratio: Column stores leverage data redundancy with algorithms such as RLE, DICTIONARY, DELTA, and BIT-PACKING to maximize storage utilization and reduce costs.
-
-
Real-time analysis of large amounts of data
-
For hot time series data, Tablestore uses wide-column stores with hybrid row-column format for real-time auto-increment writes, overwrites, and queries at scale.
-
For historical data, Tablestore uses column stores that read only the required columns, increasing query efficiency and processing speed.
-
-
Flexible hierarchical TTL settings
The TTL of an analytical store is independent of the time series table's TTL.
Usage notes
-
You can create only one analytical store for a time series table.
-
The total number of Lastpoint indexes and analytical stores that are created for a time series table cannot exceed 10.
Preparations
Create an instance for the TimeSeries model.
Regions that support the analytical store feature include China (Hangzhou), China (Shanghai), China (Beijing), and China (Zhangjiakou).
Procedure
Create an analytical store
Create an analytical store when creating a time series table
When you create a time series table, the Create Analytical Store switch is automatically turned on.
Create an analytical store for an existing time series table
-
Go to the Instance Management page.
-
Log on to the Tablestore console.
-
In the top navigation bar, select a resource group and a region.
-
On the Overview page, click the instance alias or click Manage Instance in the Actions column of the instance.
-
-
On the Instance Details tab of the Instance Management page, click the Time Series Tables tab.
-
On the Time Series Tables tab, click the time series table name.
-
In the Analytical Store section of the Basic Information tab, click Create Analytical Store.
-
In the Create Analytical Store dialog box, configure the parameters. The following table describes the parameters.
Parameter
Description
Name
The name of the analytical store. Naming conventions are the same as those for time series tables.
TTL
The validity period of data in the analytical store, in seconds. The value must be -1 (data never expires) or an int32 positive integer greater than or equal to 2592000 (30 days).
The system automatically deletes data when the time elapsed since the data columns were passed exceeds the specified TTL value.
Note-
In an analytical store, data generation time is based on when data columns are passed, not when data is written to the table.
-
The TTL of an analytical store is independent of the time series table's TTL.
Synchronization Method
The data synchronization method. Valid values:
-
Full Synchronization: synchronizes both historical and incremental data from the time series table.
-
Incremental Synchronization: synchronizes only the incremental data changes in the time series table after the analytical store is created.
ImportantThe synchronization method cannot be modified after it is specified. Proceed with caution.
-
-
Click OK.
Query and analyze data by executing SQL statements
-
Go to the Manage Time Series Table page.
-
Log on to the Tablestore console.
-
In the top navigation bar, select a resource group and a region.
-
On the Overview page, click the instance name or click Manage Instance in the Actions column of the instance.
-
On the Instance Management page, click the Instance Details tab, and then click the Time Series Tables tab.
-
On the Time Series Tables tab, click the name of the time series table.
-
-
Create a mapping table for the time series table and enable the analytical store feature.
-
On the Manage Time Series Table page, click the Query by Executing SQL Statement tab, and then click the
icon. -
In the Create Mapping Table dialog box, configure the parameters. The following table describes the parameters.
Parameter
Description
Table Type
The type of the table. Select Time Series Table.
Table Name
The name of the time series table.
Mapping Table Name
The identifier of the mapping table. You can specify a custom value.
NoteThe system automatically adds the
time series table name::prefix to the mapping table name if you select Time Series Table for Table Type.Enable Analytical Store
Turn on the Enable Analytical Store switch to use the analytical store engine.
-
Click Generate SQL Statement.
-
Click Execute SQL Statement(F8).
The mapping table for the time series table will be displayed in the left area of the page.
-
-
Use the SQL query feature to query data.
-
On the Query by Executing SQL Statement tab, enter a SELECT statement to query the required data.
For information about SQL query examples and SQL functions, see SQL query examples and SQL functions.
-
Click Execute SQL Statement(F8).
Results appear in the Execution Results section and can be displayed as a list, line chart, or histogram.
-
Query information of an analytical store
-
On the Instance Management page, click the Instance Details tab, and then click the Time Series Tables tab.
-
On the Time Series Tables tab, click the name of the time series table.
-
In the Analytical Store section of the Basic Information tab, you can view the name, TTL, synchronization method, synchronization status, storage usage, and synchronization time.
Update the TTL of an analytical store
-
On the Instance Management page, click the Instance Details tab, and then click the Time Series Tables tab.
-
On the Time Series Tables tab, click the name of the time series table.
-
In the Analytical Store section of the Basic Information tab, click Edit in the Actions column of the analytical store.
-
In the Update Analytical Store dialog box, modify the TTL of the analytical store.
-
Click Yes.
Delete an analytical store
-
On the Instance Management page, click the Instance Details tab, and then click the Time Series Tables tab.
-
On the Time Series Tables tab, click the name of the time series table.
-
In the Analytical Store section of the Basic Information tab, click Delete in the Actions column of the analytical store.
-
In the dialog box that appears, configure the Delete SQL Mapping Table for Analytical Store switch, and click OK.
-
If no mapping table exists for the time series table, keep the default setting for the Delete SQL Mapping Table for Analytical Store switch.
-
If a mapping table exists, turn on the Delete SQL Mapping Table for Analytical Store switch. The system then automatically deletes the mapping table along with the analytical store.
-
Development integration
|
Feature |
Call method |
|
Create an analytical store |
|
|
Query and analyze data by executing SQL statements |
|
|
Update the TTL of an analytical store |
|
|
Query information of an analytical store |
|
|
Delete an analytical store |
Billing
Billable items include storage usage, metered write throughput, and metered read throughput. For more information, see Billable items of the TimeSeries model.