DataService Studio supports accelerating queries on tables from specific data sources. The available solutions are the Acceleration Service, provided by DataWorks, and MaxCompute Query Acceleration (MCQA). These acceleration solutions improve the speed and performance of data queries when you call APIs. This topic describes how to use both solutions.
Background information
DataService Studio offers two acceleration solutions: Acceleration Service and MCQA. For assistance, you can join the DataWorks DingTalk group.
The following table compares the two solutions.
|
Acceleration solution |
Description |
Supported regions and resource groups |
Configuration |
|
Acceleration Service |
The Acceleration Service uses Hologres external tables to speed up queries. Hologres maps the structure of a MaxCompute table, allowing you to query MaxCompute data faster without exporting it. Note
The Hologres engine required for this solution is provided by DataService Studio, so you do not need to purchase one separately. You only need to select your target MaxCompute data table. |
|
To use the Acceleration Service, perform the following steps:
For detailed instructions, see Solution 1: Use the Acceleration Service. |
|
MCQA |
This solution uses the MaxCompute Query Acceleration (MCQA) feature. MCQA optimizes queries on small to medium-sized datasets, reducing execution times from minutes to seconds. For more information about the MCQA feature of MaxCompute, see MCQA overview. |
|
To use MCQA, simply select the MCQA acceleration solution when you configure an API. For guidance, see Solution 2: Use MCQA. |
Solution 1: Acceleration Service
Usage notes
-
An acceleration item and a data table have a one-to-one mapping.
-
Initialization fails if you add an acceleration item to a data table that is already associated with one.
Step 1: Add an acceleration item
-
Go to the Data Services page.
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a 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. -
On the Acceleration Service page, click Add Acceleration Item in the upper-right corner to open the Add Acceleration Item panel.
-
Configure the acceleration item.
Parameter
Description
Acceleration Solution
Currently, only Hologres Foreign Table is supported.
NoteThis solution uses a Hologres external table to map the structure of a MaxCompute table. This allows for faster queries without data export. DataService Studio provides the required Hologres engine, so you do not need to purchase it separately.
Data Source Type
Currently, only MaxCompute (ODPS) data sources can be accelerated.
Data Table Name
Select the MaxCompute data source and data table to accelerate.
NoteIf you have multiple data tables to accelerate, click Add Data Table to add more tables and generate multiple acceleration items at once. You can add up to 10 MaxCompute data tables at a time.
-
Click Determine. The acceleration item is created when Initialized is displayed for the selected data table in the Add Acceleration Item dialog box. Click Determine to close the dialog box.
Step 2: Configure an API
Double-click the API to open its configuration page. In the table selection area, using MaxCompute as an example, configure parameters such as the data source type, data source name, and data table name. In the Data Source Environment section, select Production Environment or Development Environment. The Acceleration Service does not support multiple availability zones. We recommend that you use a general-purpose Hologres instance and create an external table to accelerate queries on MaxCompute data.
-
Data Source Type: Select MaxCompute (ODPS).
-
Data Source Name: Select the name of the data source for which an acceleration item is configured.
-
Acceleration Method: Select Acceleration Service.
Note-
After you select Acceleration Service, this API uses the acceleration capability provided by DataService Studio to accelerate queries. You can view the acceleration item associated with this API on the acceleration item list page.
-
If you select Acceleration Service in script mode, only single-table queries are supported, and you must use Hologres syntax in the SQL editor.
-
-
Data Table Name: From the drop-down list, select a table marked as "Accelerated".
For information about other API configuration parameters, see Create an API from a data source (API Gateway) or Create an API in script mode.
Step 3: View acceleration items
The Acceleration Service page in DataService Studio lists all created acceleration items. The list includes columns such as Acceleration item ID, Data table name, Data source name, Data source type, Status, Owner, Creation time, and Actions. At the top of the page, you can search for acceleration items by Data table name and Data source name, and click Add Acceleration Item to add new ones.
|
Key parameter |
Description |
|
Operation |
This column includes Discard and View API:
|
Solution 2: MCQA
To use MCQA, simply configure the API.
Configure an API
Double-click the API to open its configuration page. In the table selection area, using MaxCompute as an example, configure parameters such as the data source type, data source name, and data table name.
-
Data Source Type: Select MaxCompute (ODPS).
-
Data Source Name: Select the name of the data source for which an acceleration item is configured.
-
Acceleration Method: Select MCQA.
NoteAfter you select MCQA, this API uses the acceleration service provided by MaxCompute to accelerate data queries.
-
Data Table Name: Select the target MaxCompute data table.
For information about other API configuration parameters, see Create an API from a data source (API Gateway) or Create an API in script mode.