Skip to main content
VeloDB Cloud 4.x is based on Doris 3.x. Versions in this section refer to Doris versions. See Version Mapping.

WARM UP

Description​

The WARM UP COMPUTE GROUP statement is used to warm up data in a compute group to improve query performance. The warm-up operation can fetch resources from another compute group or specify particular tables and partitions for warming up. The warm-up operation returns a job ID that can be used to track the status of the warm-up job.

For information on how to warmup the cache for Catalog query scenarios, please refer to the Data Cache documentation.

Syntax​

WARM UP COMPUTE GROUP <destination_compute_group_name> WITH COMPUTE GROUP <source_compute_group_name> [FORCE];
WARM UP COMPUTE GROUP <destination_compute_group_name> WITH <warm_up_list> [FORCE];
warm_up_list ::= warm_up_item [AND warm_up_item...];
warm_up_item ::= TABLE <table_name> [PARTITION <partition_name>];

Parameters​

Parameter NameDescription
destination_compute_group_nameThe name of the target compute group to be warmed up.
source_compute_group_nameThe name of the source compute group from which resources are obtained.
warm_up_listA list of specific items to be warmed up, which can include tables and partitions.
table_nameThe name of the table used for warming up.
partition_nameThe name of the partition used for warming up.

Return Value​

  • JobId: The ID of the warm-up job.

Materialized view caches​

WARM UP preloads stored data into a cluster's local cache. It does not create or refresh a materialized view (MV). Clusters in the same warehouse already share MV definitions and stored data.

  • For a synchronous MV, specify its base table with WITH TABLE. Warmup includes the table's visible synchronous MVs. Do not specify the synchronous MV name as a separate table.
  • For an asynchronous MV, specify the MV name with WITH TABLE, just as you would a table. Warming its base tables does not automatically warm the asynchronous MV. Complete the MV refresh before warming its new data.
  • WITH COMPUTE GROUP selects data using the source cluster's hotspot statistics and the destination's cache capacity. This can include MV data, but it does not guarantee that every MV is selected. Hotspot collection is asynchronous. This form creates a one-time job by default.

For example, warm an asynchronous MV named sales_mv in the current database:

WARM UP COMPUTE GROUP destination_group WITH TABLE sales_mv;

For a complete creation, refresh, warmup, and verification example, see Warm up materialized view caches.

Examples​

  1. Warm up the compute group named destination_group_name using the compute group named source_group_name
WARM UP COMPUTE GROUP destination_group_name WITH COMPUTE GROUP source_group_name;
  1. Warm up the tables sales_data and customer_info, and the partition q1_2024 of the table orders using the compute group named destination_group.
WARM UP COMPUTE GROUP destination_group WITH
TABLE sales_data
AND TABLE customer_info
AND TABLE orders PARTITION q1_2024;