Establish a performance baseline

Updated at:

The performance of MaxCompute tables primarily depends on proper table design. To measure performance effectively, establish a baseline before you start optimizing.

When testing performance before and after optimization, record each table's data synchronization time, storage usage, and query performance. If you purchase MaxCompute project resources on a subscription basis, you also need to record the quantity purchased.

Item

Value

Data synchronization time

None

Storage usage

None

Query execution time

None

Estimated query charge

None

Record data synchronization time

After you run a data synchronization task, go to the Operation Center > Cycle Examples page, right-click the instance, and check the task's run time.

Record storage usage

Log on to the DataWorks console.

Use the describe command to view the storage size of a table or a partition. For more information, see DESC TABLE/VIEW.

--odps sql
--**********************
--author:dataphin
--create time:2019-05-13 16:08:04
--**********************
DESCRIBE s_sale;

+------------------------------------------------------------------------------------+
| Owner: ALIYUN$xxx          | Project: test_asale_dev                              |
| TableComment: ODS for normal purchases                                             |
+------------------------------------------------------------------------------------+
| CreateTime:               2019-04-30 13:29:03                                      |
| LastDDLTime:              2019-04-30 13:29:03                                      |
| LastModifiedTime:         2019-04-30 19:26:46                                      |
| Lifecycle:                400                                                      |
+------------------------------------------------------------------------------------+
| InternalTable: YES        | Size: 9408                                             |
+------------------------------------------------------------------------------------+
| Native Columns:                                                                    |
+------------------------------------------------------------------------------------+
| Field          | Type      | Label | Comment                                      |

Record query execution time and estimated charges

Log on to the DataWorks console, go to the DataStudio page, and create an ODPS SQL node.

You can view the estimated cost by clicking the 估算 icon. Click the $ (Estimate Cost) button on the toolbar to open the Cost Estimate dialog box. For example, the estimated cost to run SELECT * FROM s_sale WHERE ds=20190428 is CNY 0.01. For pay-as-you-go users, each run incurs a fee. A fee of less than CNY 0.01 is rounded up to CNY 0.01. The actual fee appears on your bill. After the task completes, check the run log for the execution time.

--odps sql
--*************************************************************
--author:xxx
--create time:2019-04-30 11:39:25
--*************************************************************

SELECT * FROM s_sale WHERE ds=20190428;
SELECT * FROM s_auction WHERE ds=20190428;
SELECT * FROM s_users_extra WHERE ds=20190428;
SELECT * FROM s_biz_order_delta WHERE ds=20190428;
SELECT * FROM s_logistics_order_delta WHERE ds=20190428;
SELECT * FROM s_pay_order_delta WHERE ds=20190428;