When dynamic table refreshes share compute with other queries, resource contention during peak hours can delay data updates. The computing_resource parameter lets you assign dedicated compute to dynamic table refreshes—either on a scheduled basis or during manual refreshes—so you can control resource isolation, cost, and throughput independently. This page describes the available resource types, how to set them, and how behavior changes across Hologres versions.
Choose a resource type
| Resource type | How it works | Best for |
|---|---|---|
serverless (default in V4.0.1+) | Uses a remote, fully managed Serverless Computing resource pool. The engine determines the required resources per query, providing query-level resource isolation and elastic scaling. No reserved capacity needed. | Most workloads. Default in V4.0.1 and later. |
local | Uses the resources of the current instance (general-purpose instance) or the warehouse associated with the current connection (virtual warehouse instance in V4.0.7+). Resources are shared with other queries; resource contention may occur during peak hours. | Workloads that must stay on the instance's reserved resources. |
<warehouse_name> | Runs the refresh on a specific virtual warehouse, providing warehouse-level resource isolation. Supported only on virtual warehouse instances (V4.0.7+). | Workloads that require dedicated, isolated compute on a specific warehouse. |
For details on Serverless Computing, see Serverless Computing overview. For details on virtual warehouses, see Getting started with virtual warehouses.
Parameter reference
The computing_resource parameter is optional. Set it in the WITH clause when creating a dynamic table, or pass it explicitly during a manual refresh.
| Parameter | Required | Default | Description | Example |
|---|---|---|---|---|
computing_resource | No | serverless (V4.0.1+); local (V3.0) | The resource type for refreshing the dynamic table. Accepted values: local, serverless, or <warehouse_name> (V4.0.7+ only, virtual warehouse instances only). | computing_resource='serverless' |
Syntax
V4.0.7 and later
V4.0.7 introduced warehouse_name as a valid value, enabling warehouse-level resource isolation on virtual warehouse instances. The meaning of local also changed: it now refers to the currently connected warehouse, rather than the leader warehouse of the table group (TG).
Create a dynamic table with a specified resource:
-- Specify refresh resources when creating the table.
CREATE [EXTERNAL] DYNAMIC TABLE [ IF NOT EXISTS ] [<schema_name>.]<table_name>
[ (<col_name> [, ...] ) ]
[LOGICAL PARTITION BY LIST(<partition_key>)]
WITH (
freshness = '<num> {minutes | hours}', -- Required.
[computing_resource = {'local' | 'serverless' | '<warehouse_name>'},] -- Optional.
)
AS
<query>; -- Definition of the query.Manually refresh with a specified resource:
-- Specify refresh resources during a manual refresh.
REFRESH DYNAMIC TABLE [<schema_name>.]<table_name>
WITH (computing_resource = 'local' | 'serverless' | '<warehouse_name>');V4.0.1 to V4.0.6
V4.0.1 changed the default refresh resource from local to serverless. The warehouse_name value is not supported in this range.
Create a dynamic table:
CREATE [EXTERNAL] DYNAMIC TABLE [ IF NOT EXISTS ] [<schema_name>.]<table_name>
[ (<col_name> [, ...] ) ]
[LOGICAL PARTITION BY LIST(<partition_key>)]
WITH (
freshness = '<num> {minutes | hours}', -- Required.
[computing_resource = {'local' | 'serverless'},] -- Optional.
)
AS
<query>; -- Definition of the query.Manually refresh:
REFRESH DYNAMIC TABLE [<schema_name>.]<table_name>
WITH ([computing_resource = 'local' | 'serverless']);V3.1 to V3.2
Syntax and defaults are the same as V4.0.1–V4.0.6. The warehouse_name value is not supported.
Create a dynamic table:
CREATE [EXTERNAL] DYNAMIC TABLE [ IF NOT EXISTS ] [<schema_name>.]<table_name>
[ (<col_name> [, ...] ) ]
[LOGICAL PARTITION BY LIST(<partition_key>)]
WITH (
freshness = '<num> {minutes | hours}', -- Required.
[computing_resource = {'local' | 'serverless'},] -- Optional.
)
AS
<query>; -- Definition of the query.Manually refresh:
REFRESH DYNAMIC TABLE [<schema_name>.]<table_name>
WITH ([computing_resource = 'local' | 'serverless']);V3.0
V3.0 uses a different syntax with separate parameters for incremental and full refreshes, and defaults to local resources.
Create a dynamic table:
CREATE DYNAMIC TABLE [IF NOT EXISTS] <schema.tablename>(
[col_name],
[col_name]
) [PARTITION BY LIST (col_name)]
WITH (
[refresh_mode='[full|incremental]',]
[incremental_auto_refresh_schd_start_time='[immediate|<timestamptz>]',]
[incremental_auto_refresh_interval='[<num> {minute|minutes|hour|hours}]',]
[incremental_guc_hg_computing_resource='[local|serverless]',]
[full_guc_hg_computing_resource='[local|serverless]',]
)
AS
<query>; -- Definition of the query.Manually refresh:
REFRESH DYNAMIC TABLE [<schema_name>.]<table_name>
WITH (
[incremental_guc_hg_computing_resource = 'local' | 'serverless',]
[full_guc_hg_computing_resource = 'local' | 'serverless']
);Default refresh resources by version
Auto-refresh defaults
V4.0.7 and later
| Table type | Non-virtual warehouse instance | Virtual warehouse instance |
|---|---|---|
| Dynamic table | Serverless by default. Can specify local (instance resources). | Serverless by default. Can specify warehouse_name. Specifying local without a warehouse_name uses the warehouse of the current connection. |
| External dynamic table | Serverless by default. Can specify local (instance resources). | Serverless by default. Can specify warehouse_name. Specifying local without a warehouse_name uses the warehouse of the current connection. |
V4.0.1 to V4.0.6
| Table type | Non-virtual warehouse instance | Virtual warehouse instance |
|---|---|---|
| Dynamic table | Serverless by default. Can specify local (instance resources). | Serverless by default. local uses the leader warehouse of the base table's TG and the leader warehouse of the dynamic table's TG—multiple warehouses may be involved. warehouse_name is not supported. |
| External dynamic table | Serverless by default. Can specify local (instance resources). | Serverless by default. local uses the leader warehouse of the default TG in the database where the external dynamic table was created. warehouse_name is not supported. |
V3.1 to V3.2
| Table type | Non-virtual warehouse instance | Virtual warehouse instance |
|---|---|---|
| Dynamic table | Serverless by default. Can specify local (instance resources). | Serverless by default. local uses the leader warehouse of the base table's TG and the leader warehouse of the dynamic table's TG—multiple warehouses may be involved. warehouse_name is not supported. |
V3.0
| Table type | Non-virtual warehouse instance | Virtual warehouse instance |
|---|---|---|
| Dynamic table | local by default. Can specify serverless. | local by default, using the leader warehouse of the dynamic table's TG. Can specify serverless. warehouse_name is not supported. |
Manual refresh resource priority
When you trigger a manual refresh, the resource used follows this priority order:
Explicitly set value: If you pass
computing_resourcein theREFRESHstatement, that value takes effect regardless of the table's Data Definition Language (DDL).DDL value: If you do not pass
computing_resourcein theREFRESHstatement, the value from the table's DDL is used.
Accepted values per instance type (V4.0.7+):
Virtual warehouse instance:
local(currently connected warehouse),serverless, or<warehouse_name>Non-virtual warehouse instance:
local(instance resources) orserverless
Accepted values per instance type (V4.0.1–V4.0.6 and V3.1–V3.2):
Virtual warehouse instance:
localorserverless.localuses the leader warehouse of the base table's TG and the leader warehouse of the dynamic table's TG—multiple warehouses may be involved.Non-virtual warehouse instance:
local(instance resources) orserverless
V3.0:
Virtual warehouse instance:
local(leader warehouse of the dynamic table's TG) orserverlessNon-virtual warehouse instance:
local(instance resources) orserverless
Usage notes
If you set
computing_resourceto awarehouse_nameand then delete that virtual warehouse, the refresh fails.If you set
computing_resourceto awarehouse_nameand then rename that warehouse, the refresh continues normally. The new warehouse name appears in the DDL.If you set
computing_resourcetoserverlessbut the dynamic table's query does not meet the conditions for serverless execution, the refresh automatically falls back tolocalresources: The DDL (viewable viahg_dump_script) still showscomputing_resource = 'serverless'after a fallback. If the query later meets serverless execution conditions, subsequent refreshes use serverless resources. To check which resources were actually used for a specific refresh, check the slow query log.On a virtual warehouse instance:
localrefers to the leader warehouse of the TG where the dynamic table resides. For an external dynamic table,localrefers to the default warehouse of the instance.On a non-virtual warehouse instance:
localrefers to the reserved resources of the instance.
Upgrade notes
The following tables summarize how refresh resource behavior changes when you upgrade Hologres. The key difference is between tables created with the new syntax (V3.1+) and tables that still use the legacy V3.0 syntax.
Auto-refresh resource changes on upgrade
| Source version | Target version | Table type | Non-virtual warehouse instance | Virtual warehouse instance |
|---|---|---|---|---|
| 3.0 | 3.1, 3.2, or 4.0.1–4.0.6 | Dynamic table | New tables: Default changes from local to serverless. Can set local.<br>Legacy V3.0 tables: Default remains local. Can change to serverless. | New tables: Default changes from local to serverless. Can set local; local uses the leader warehouse of the base table's TG and the dynamic table's TG (multiple warehouses may be involved).<br>Legacy V3.0 tables: Default remains local (leader warehouse of the dynamic table's TG). Can change to serverless. After updating to new syntax, local changes to include both the base table's TG leader and the dynamic table's TG leader. |
| 3.0 | 4.0.7 and later | Dynamic table | New tables: Default changes from local to serverless. Can set local.<br>Legacy V3.0 tables: Default remains local. Can change to serverless. | New tables: Default changes from local to serverless. Can specify warehouse_name. local refers to the currently connected warehouse.<br>Legacy V3.0 tables: Default remains local (leader warehouse of the dynamic table's TG). Can change to serverless. After updating to new syntax, local remains the leader warehouse of the dynamic table's TG. |
| 3.1, 3.2, or 4.0.1–4.0.6 | 4.0.7 and later | Dynamic table | New tables: Default remains serverless. Can set local.<br>Legacy V3.0 tables: Default remains local. Can change to serverless. | New tables: Default remains serverless. Can specify warehouse_name. local refers to the currently connected warehouse.<br>Legacy V3.0 tables: Default remains local (leader warehouse of the dynamic table's TG). Can change to serverless. After updating to new syntax, local changes from both the base table's TG leader and the dynamic table's TG leader to just the dynamic table's TG leader. |
| 4.0.1–4.0.6 | 4.0.7 and later | External dynamic table | New tables: Default remains serverless. Can set local. | New tables: Default remains serverless. Can specify warehouse_name. local refers to the currently connected warehouse.<br>Old tables (created in V4.0.1–4.0.6): Default remains serverless. local uses the instance's default warehouse. |
Manual refresh resource changes on upgrade
| Source version | Target version | Table type | Non-virtual warehouse instance | Virtual warehouse instance |
|---|---|---|---|---|
| 3.0 | 3.1, 3.2, or 4.0.1–4.0.6 | Dynamic table | Explicit resource takes precedence. Without explicit setting, the DDL value is used. | Explicit resource takes precedence. Without explicit setting, the DDL value is used. For new-syntax tables: local changes from the dynamic table's TG leader to both the base table's TG leader and the dynamic table's TG leader (multiple warehouses may be involved). For legacy V3.0 tables: local remains the dynamic table's TG leader. |
| 3.0 | 4.0.7 and later | Dynamic table | Explicit resource takes precedence. Without explicit setting, the DDL value is used. Can specify local or serverless. | Explicit resource takes precedence. Without explicit setting, the DDL value is used. Can specify local, serverless, or warehouse_name. For new-syntax tables: local changes to the currently connected warehouse. For legacy V3.0 tables: local remains the dynamic table's TG leader. |
| 3.1, 3.2, or 4.0.1–4.0.6 | 4.0.7 and later | Dynamic table | Explicit resource takes precedence. Without explicit setting, the DDL value is used. Can specify local or serverless. | Explicit resource takes precedence. Without explicit setting, the DDL value is used. Can specify local, serverless, or warehouse_name. For new-syntax tables: local changes from both the base table's TG leader and the dynamic table's TG leader to the currently connected warehouse. For legacy V3.0 tables: local remains the dynamic table's TG leader. |
| 4.0.1–4.0.6 | 4.0.7 and later | External dynamic table | Explicit resource takes precedence. Without explicit setting, the DDL value is used. Can specify local or serverless. | Explicit resource takes precedence. Without explicit setting, the DDL value is used. Can specify local, serverless, or warehouse_name. local refers to the currently connected warehouse. |