🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Snowflake Multi-Cluster Warehouses

đŸŸĸ Free Lesson

Advertisement

Snowflake Multi-Cluster Warehouses

Multi-cluster warehouses in Snowflake automatically scale compute resources based on workload demands, ensuring consistent performance while optimizing costs.

Multi-Cluster Warehouse ArchitectureQueriesIncomingRouterLoad BalanceCluster 1ActiveCluster 2ActiveCluster 3SuspendedResultsScaling Policy: STANDARDScale up at 100% utilizationScaling Policy: ECONOMYScale up at 100% for 6+ minAuto-Suspend: 60-600sIdle clusters auto-stop
Scaling Timeline: Cluster Count Over TimeTimeClustersPeak: 4 clustersScale down

Scaling Policies

Snowflake supports two scaling policies that determine when additional clusters are added or removed:

STANDARD Policy

The STANDARD policy scales up immediately when all existing clusters reach 100% utilization. This prioritizes query performance over cost, making it ideal for production workloads where latency is critical. Snowflake will add a new cluster as soon as the current cluster queue depth exceeds a threshold.

ECONOMY Policy

The ECONOMY policy introduces a delay before scaling up, waiting at least 6 minutes at 100% utilization before adding a cluster. This reduces costs by avoiding rapid scaling for brief spikes, making it suitable for development, testing, and non-critical analytics workloads. Scale-down happens more aggressively to minimize idle clusters.

Creating Multi-Cluster Warehouses

-- Create a multi-cluster warehouse with STANDARD policy
CREATE OR REPLACE WAREHOUSE analytics_mcw
  WAREHOUSE_SIZE = 'MEDIUM'
  MIN_CLUSTERS = 1
  MAX_CLUSTERS = 5
  SCALING_POLICY = 'STANDARD'
  AUTO_SUSPEND = 300
  AUTO_RESUME = TRUE
  INITIALLY_SUSPENDED = FALSE
  COMMENT = 'Multi-cluster warehouse for analytics workloads';

-- Create an ECONOMY policy warehouse for batch jobs
CREATE OR REPLACE WAREHOUSE etl_mcw
  WAREHOUSE_SIZE = 'LARGE'
  MIN_CLUSTERS = 1
  MAX_CLUSTERS = 8
  SCALING_POLICY = 'ECONOMY'
  AUTO_SUSPEND = 600
  AUTO_RESUME = TRUE
  COMMENT = 'Economy multi-cluster for ETL processing';

-- Create a multi-cluster for high-concurrency dashboards
CREATE OR REPLACE WAREHOUSE dashboard_mcw
  WAREHOUSE_SIZE = 'SMALL'
  MIN_CLUSTERS = 2
  MAX_CLUSTERS = 10
  SCALING_POLICY = 'STANDARD'
  AUTO_SUSPEND = 120
  AUTO_RESUME = TRUE
  COMMENT = 'High-concurrency warehouse for BI dashboards';

-- Alter an existing warehouse to add multi-cluster
ALTER WAREHOUSE existing_wh
  SET
    MIN_CLUSTERS = 2
    MAX_CLUSTERS = 6
    SCALING_POLICY = 'ECONOMY';

-- Suspend a specific cluster
ALTER WAREHOUSE analytics_mcw SUSPEND CLUSTER 2;

-- Resume a specific cluster
ALTER WAREHOUSE analytics_mcw RESUME CLUSTER 2;

Monitoring Multi-Cluster Performance

-- Check active clusters for a warehouse
SELECT
  WAREHOUSE_NAME,
  CLUSTER_NUMBER,
  CLUSTER_STATE,
  ACTIVE_QUERY_COUNT,
  QUEUED_OVERLOAD_QUERIES,
  QUERY_AVERGAGE_EXECUTION_TIME_MS
FROM TABLE(WAREHOUSE_LOAD_HISTORY(
  DATE_RANGE_START => DATEADD('hour', -1, CURRENT_DATE()),
  DATE_RANGE_END => CURRENT_DATE()
))
WHERE WAREHOUSE_NAME = 'ANALYTICS_MCW'
ORDER BY CLUSTER_NUMBER;

-- Monitor cluster scaling events
SELECT
  WAREHOUSE_NAME,
  EVENT_NAME,
  EVENT_TIMESTAMP,
  CLUSTER_NUMBER,
  NEW_CLUSTER_COUNT
FROM TABLE(WAREHOUSE_EVENT_HISTORY(
  DATE_RANGE_START => DATEADD('day', -7, CURRENT_DATE())
))
WHERE WAREHOUSE_NAME = 'ANALYTICS_MCW'
  AND EVENT_NAME IN ('MULTI_CLUSTER_UPSCALE', 'MULTI_CLUSTER_DOWNSCALE')
ORDER BY EVENT_TIMESTAMP DESC;

-- Analyze query distribution across clusters
SELECT
  CLUSTER_NUMBER,
  COUNT(*) AS query_count,
  AVG(EXECUTION_TIME_MS) / 1000 AS avg_exec_seconds,
  P50_EXECUTION_TIME_MS / 1000 AS median_exec_seconds
FROM TABLE(INFORMATION_SCHEMA.QUERY_HISTORY(
  DATE_RANGE_START => DATEADD('day', -1, CURRENT_DATE())
))
WHERE WAREHOUSE_NAME = 'ANALYTICS_MCW'
GROUP BY 1
ORDER BY 1;

Multi-Cluster vs Single-Cluster Decision Matrix

FactorSingle-ClusterMulti-Cluster
Concurrent queriesUnder 1010-1000+
Query complexitySimple to moderateAny complexity
Peak workload predictabilityConsistentVariable/spiky
Cost optimizationSimpler to manageRequires tuning
Scaling approachVertical onlyHorizontal + vertical
Auto-suspend behaviorSingle warehousePer-cluster suspend
Use caseDev/test, small BIEnterprise analytics, high concurrency

Performance Metrics for Cluster Scaling

MetricDescriptionTarget
Cluster utilizationPercentage of time clusters are active60-80% average
Queue depthNumber of queries waiting for a clusterUnder 5
Scale-up latencyTime from 100% utilization to new clusterUnder 30 seconds (STANDARD)
Scale-down latencyTime from idle to cluster suspension60-600 seconds (configurable)
Query wait timeTime queries spend in queueUnder 10 seconds
Credit efficiencyActive clusters vs total availableMin cluster count when possible

Best Practices

PracticeDescriptionImpact
Start with MIN_CLUSTERS=1Let Snowflake scale from minimal baselineReduces initial cost
Use ECONOMY for batchDelay scaling for non-critical workloads15-25% credit savings
Use STANDARD for BI dashboardsImmediate scaling for user-facing queriesBetter user experience
Set AUTO_SUSPEND per workloadShorter for interactive, longer for batchOptimizes idle cost
Monitor queue depth regularlyAdjust MAX_CLUSTERS based on actual demandPrevents over-provisioning
Use RESOURCE MONITORSSet credit quotas per multi-cluster warehousePrevents cost overruns
Avoid MAX_CLUSTERS=10 unless neededHigh max creates potential for large cost spikesConservative scaling
Review cluster distributionEnsure queries are balanced across clustersConsistent performance

See Also

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Need Expert Snowflake Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement