Acceleration service

更新时间:
复制 MD 格式

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.

  • Supported in the China (Shanghai), China (Beijing), China (Hangzhou), and China (Shenzhen) regions.

  • Billing for the Acceleration Service on public DataService Studio resource groups started on March 1, 2023. For details, see Billing of public resource groups for DataService Studio. Exclusive DataService Studio resource groups can use this service directly.

  • Currently, this solution supports accelerating only MaxCompute data sources.

To use the Acceleration Service, perform the following steps:

  1. Add an acceleration item

  2. Configure an API

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.

  • This solution is supported in the China (Beijing), China (Hangzhou), China (Shanghai), and China (Shenzhen) regions where the capability upgrade is complete.

  • This solution is available only for exclusive DataService Studio resource groups.

  • This solution supports both pay-as-you-go and subscription MaxCompute projects.

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

  1. Go to the Data Services page.

    Log on to the DataWorks console. In the target region, click Data Analysis and Service > DataService Studio in the left-side navigation pane. Select a workspace from the drop-down list and click Go to DataService Studio.

  2. In the left-side navigation pane, click the 数据加速 icon to go to the Acceleration Service page.

  3. On the Acceleration Service page, click Add Acceleration Item in the upper-right corner to open the Add Acceleration Item panel.

  4. Configure the acceleration item.

    Parameter

    Description

    Acceleration Solution

    Currently, only Hologres Foreign Table is supported.

    Note

    This 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.

    Note

    If 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.

  5. 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:

  • Discard: Click to discard the current acceleration item. After an item is discarded, test calls to related unpublished APIs fail.

    Note

    Before you discard an acceleration item, check which APIs are associated with it, take them offline, and then discard the item.

  • View API: Click to view a list of associated APIs.

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.

    Note

    After 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.