Try PolarDB for MySQL IMCI for free
Try the PolarDB for MySQL columnstore index (IMCI) feature for free.
Background
The PolarDB columnstore index is suitable for scenarios that require lightweight data analytics on online data, such as real-time reports, and for ETL data acceleration scenarios. With the powerful and flexible computing capabilities that PolarDB provides through the columnstore index, you can use SQL in PolarDB to implement ETL.
The columnstore index offers the following core advantages:
100% compatible with MySQL: The column store has a data type system consistent with MySQL, supports flexible type conversions, and is 100% compatible with the MySQL protocol.
Hybrid row-column storage, lower costs: Both row store and column store formats are supported, and transaction-level consistency between rows and columns is ensured in real time. The column store also offers lower costs.
Efficient lightweight data analytics: The columnstore index accelerates certain data analytics scenarios.
Alibaba Cloud provides a database solutions feature experience center, which offers a free, real-world PolarDB cluster environment and ready-to-use testing methods. You can quickly evaluate the query efficiency improvements that IMCI delivers online.
Impact
This feature trial does not involve deployment in a production environment and therefore does not affect your business.
Costs
The resources used in this trial do not belong to you, so the trial does not incur any costs.
What to expect
Trial environment
For this free trial, Alibaba Cloud provides a pre-configured environment for you to use. The details are as follows:
Cluster: A PolarDB for MySQL cluster is provided. The details are as follows:
Kernel version: 8.0.2.2.20
Edition: Enterprise Edition
Series: cluster edition, general-purpose
Cluster specifications: The cluster includes one primary node, one read-only node, and one read-only column store node. Each node has 4 cores and 8 GB of memory.
Storage type: PSL5
Test dataset: The cluster is preloaded with the standard TPC-H 100 GB test set. The queries use the part table, which contains 20,000,000 rows.
Metrics to observe
CPU utilization: The average CPU utilization of the primary node, read-only node, and read-only column store node in the cluster. Unit: %.
Query duration: The time required to run a specific SQL statement. Unit: seconds.
Procedure
Go to the Business Foundation System Solutions experience center.
Click Core Feature Trial, and then, for Columnstore Index - Accelerate Complex TP SQL Queries, click Free Trial to open the feature trial page.
Click Create Free Trial Task at the bottom of the page.
In the Confirm IMCI Task Creation dialog box, click OK.
After a moment, the trial task that you created appears.
Click View Details to open the real-time query trial page.
First, run the Normal Query task with IMCI disabled.
NoteFollow the button prompts on the page and manually click the buttons to complete each step. If you do not click a button before the countdown ends, the corresponding operation runs automatically.
Throughout the trial, observe CPU utilization in the trend chart on the left.
Click Start Task.
Click Switch to Normal Query DB. The following command runs automatically to switch to the normal query database.
use tpch;Click View Execution Plan. The following command runs automatically to view the execution plan for the following SQL statement.
explain format=TREE SELECT SUM(p_retailprice), AVG(p_retailprice) -> , MIN(p_retailprice), MAX(p_retailprice) -> FROM part -> GROUP BY p_type -> ORDER BY 1 -> LIMIT 1;The following result is returned:
+-----------------------------------------------------------------------------+ | EXPLAIN | +-----------------------------------------------------------------------------+ | -> Limit: 1 row(s) -> Sort: <temporary>.SUM(p_retailprice), limit input to 1 row(s) per chunk -> Table scan on <temporary> -> Aggregate using temporary table -> Table scan on part (cost=1817555.30 rows=17644998) | +-----------------------------------------------------------------------------+ 1 row in set (0.00 sec)Click Execute SQL. The following SQL statement runs automatically:
SELECT SUM(p_retailprice), AVG(p_retailprice) -> , MIN(p_retailprice), MAX(p_retailprice) -> FROM part -> GROUP BY p_type -> ORDER BY 1 -> LIMIT 1;The following result is returned. The execution time is 23.73 seconds.
+--------------------+--------------------+--------------------+--------------------+ | SUM(p_retailprice) | AVG(p_retailprice) | MIN(p_retailprice) | MAX(p_retailprice) | +--------------------+--------------------+--------------------+--------------------+ | 198461679.87 | 1498.366804 | 901.47 | 2098.51 | +--------------------+--------------------+--------------------+--------------------+ 1 row in set (23.73 sec)
Then, run the query task with IMCI enabled.
NoteFollow the button prompts on the page and manually click the buttons to complete each step. If you do not click a button before the countdown ends, the corresponding operation runs automatically.
Throughout the trial, observe CPU utilization in the trend chart on the left.
Click Switch to IMCI Read Endpoint to connect to the same query database through the cluster endpoint that includes the read-only column store node.
NoteBecause switching the endpoint to connect to the database involves a password, only the SQL statement that switches to the tpch database after a successful connection is shown here.
use tpch;Click View Execution Plan. The following command runs automatically to view the execution plan for the following SQL statement.
explain format=TREE SELECT SUM(p_retailprice), AVG(p_retailprice) -> , MIN(p_retailprice), MAX(p_retailprice) -> FROM part -> GROUP BY p_type -> ORDER BY 1 -> LIMIT 1;The following result is returned:
+----+--------------------------+------+--------------------------------------------------------------+ | ID | Operator | Name | Extra Info | +----+--------------------------+------+--------------------------------------------------------------+ | 1 | Select Statement | | IMCI Execution Plan (max_dop = 4, max_query_mem = 858993459) | | 2 | └─Compute Scalar | | | | 3 | └─Limit | | Offset=0 Limit=1 | | 4 | └─Sort | | Sort Key: SUM(part.p_retailprice) ASC | | 5 | └─Hash Groupby | | Group Key: part.p_type | | 6 | └─Table Scan | part | | +----+--------------------------+------+--------------------------------------------------------------+ 6 rows in set (0.01 sec)Click Execute SQL. The following SQL statement runs automatically:
SELECT SUM(p_retailprice), AVG(p_retailprice) -> , MIN(p_retailprice), MAX(p_retailprice) -> FROM part -> GROUP BY p_type -> ORDER BY 1 -> LIMIT 1;The following result is returned. The execution time is 0.58 seconds.
+--------------------+--------------------+--------------------+--------------------+ | SUM(p_retailprice) | AVG(p_retailprice) | MIN(p_retailprice) | MAX(p_retailprice) | +--------------------+--------------------+--------------------+--------------------+ | 198461679.87 | 1498.366804 | 901.47 | 2098.51 | +--------------------+--------------------+--------------------+--------------------+ 1 row in set (0.58 sec)While the SQL statement runs, observe changes in the average CPU utilization of the cluster in the trend chart on the left.
NoteReal-time monitoring data may be delayed. To ensure that the trend chart displays the complete change in CPU utilization, the monitoring period automatically extends for 2 to 3 seconds after SQL execution completes.
(Optional) For a created task, go to the IMCI page and click Trial Records. In Task List, click All Tasks or My Tasks to view the trial results and their details.
Result analysis
The columnstore index IMCI significantly accelerates queries
In terms of execution time, after switching to the cluster endpoint that includes the read-only column store node, a complex query is automatically run by the read-only column store node. The execution time is significantly reduced from 23.73 seconds to 0.58 seconds.
In terms of the execution plan, after switching to the cluster endpoint that includes the read-only column store node, the execution plan contains IMCI Execution Plan, which indicates that columnstore index acceleration is in use.
The columnstore index IMCI processes queries more efficiently
Real-time monitoring data may be delayed. To ensure that the trend chart displays the complete change in CPU utilization, the monitoring period automatically extends for 2 to 3 seconds after SQL execution completes.
The execution time and corresponding CPU utilization show that IMCI delivers faster queries with lower CPU utilization.

Related topics
Contact experts
Join the official DingTalk group for consultation and additional technical support. DingTalk group number: 27520023189.