DataService Studio allows you to configure an acceleration solution to accelerate queries of specific raw data tables. The acceleration solutions include Acceleration Service provided by DataService Studio and MCQA provided by MaxCompute. You can configure an acceleration solution for an API to improve the query performance and efficiency of the API. This topic describes the supported acceleration solutions and how to configure an acceleration solution for an API.
Background information
DataService Studio provides the following acceleration solutions: Acceleration Service and MCQA. You can join the DataWorks DingTalk group for consultation.
The following table describes the two acceleration solutions.
Acceleration solution | Description | Supported region and resource group | Configuration |
Acceleration Service | This acceleration solution is implemented based on Hologres external tables. This solution allows Hologres to establish mappings between the schema of a Hologres external table and that of a MaxCompute table. You do not need to export data from MaxCompute. This accelerates the query of MaxCompute data. Note When you use this solution, you do not need to purchase a Hologres compute engine instance because an existing Hologres compute engine instance is automatically used. You need to only specify the MaxCompute table for which you want to enable acceleration. |
| Before you use the acceleration solution, you must perform the following operations:
For more information, see Use the Acceleration Service solution. |
MCQA | This acceleration solution is implemented based on the MaxCompute Query Acceleration (MCQA) feature. You can use this solution to accelerate the execution of small- and medium-sized query jobs, and reduce the execution time from minutes to seconds. For more information, see MCQA overview. |
| To use the acceleration solution, you need to only select MCQA for the Acceleration Method parameter when you configure an API. For more information, see Use the MCQA solution. |
Use the Acceleration Service solution
Precautions
An acceleration item can contain only one data table, and only one acceleration item can be added for a data table.
When you add an acceleration item, if you select the name of a data table for which an acceleration item has been added, the acceleration item fails to be initialized.
Step 1: Add an acceleration item
Go to the DataService Studio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to DataService Studio.
In the left-side navigation pane, click the icon to go to the Acceleration Service page.
In the upper-right corner of the Acceleration Service page, click Add Acceleration Item.
In the Add Acceleration Item dialog box, configure the parameters. The following table describes the parameters.
Parameter
Description
Acceleration Solution
Select Hologres Foreign Table.
NoteHologres is a real-time data warehousing service developed by Alibaba Cloud and is connected to MaxCompute at the underlying layer. The Acceleration Service solution is implemented based on Hologres external tables. This solution allows Hologres to establish mappings between the schema of a Hologres external table and that of a MaxCompute table. You do not need to export data from MaxCompute. This accelerates the query of MaxCompute data. When you use this solution, you do not need to purchase a Hologres compute engine instance because an existing Hologres compute engine instance is automatically used. You need to only specify the MaxCompute table for which you want to enable acceleration.
Datasource Type
Select MaxCompute (ODPS).
Table Name
Select the names of the MaxCompute data source and data table.
NoteIf you want to accelerate queries of multiple data tables, click Add Table to add the data tables. This way, multiple acceleration items can be added at a time. You can add a maximum of 10 MaxCompute data tables at a time.
Click OK. After Initialize Succeeded appears in the Status column of the Add Acceleration Item dialog box, click Close.
Step 2: Configure an API
Find the desired API and double-click the name of the API. In the Select Table section of the configuration tab of the API, configure the Datasource Type, Datasource Name, Acceleration Method, and Table Name parameters.
Datasource Type: Select MaxCompute (ODPS).
Datasource Name: Select the name of the data source for which an acceleration item is added.
Acceleration Method: Select Acceleration Service.
NoteAfter you set the Acceleration Method parameter to Acceleration Service, the Acceleration Service solution is used to accelerate data queries that are performed by using the API. On the Acceleration Service page, you can view the acceleration items that are associated with the API.
If an API is created by using the code editor, you can use this API to perform only single-table queries and must use the Hologres syntax in the code editor.
Table Name: The data tables for which an acceleration item is added are marked with Accelerated. You can select a data table for which an acceleration item is added from the drop-down list.
For more information about how to configure other parameters, see Create an API by using the codeless UI or Create an API by using the code editor.
Step 3: View acceleration items
On the Acceleration Service page of DataService Studio, you can view the accelerated items that you added.
Column name | Description |
Actions | Supported operations: Discard and View API.
|
Use the MCQA solution
To use the MCQA acceleration solution, you need to only configure an API.
Configure an API
Find the desired API and double-click the name of the API. In the Select Table section of the configuration tab of the API, configure the Datasource Type, Datasource Name, Acceleration Method, and Table Name parameters.
Datasource Type: Select MaxCompute (ODPS).
Datasource Name: Select the name of the data source for which an acceleration item is added.
Acceleration Method: Select MCQA.
NoteAfter you set the Acceleration Method parameter to MCQA, the MCQA solution is used to accelerate data queries that are performed by using the API.
Table Name: Select the name of the desired MaxCompute data table.
For more information about how to configure other parameters, see Create an API by using the codeless UI or Create an API by using the code editor.