@@ -12,7 +12,7 @@ This topic explains how to manage scalable and flexible query warehouse through
1212![ Warehouse On Premise] ( /img/deploy/on-premise-warehouse.png )
1313
1414** Scenario Description**
15- Previously, we introduced to deploy databend using static ` tenant_id ` and ` cluster_id ` in the ! [ deployment] ( https://docs.databend.com/guides/deploy/deploy/production/metasrv-deploy#step-2-deploy-query-nodes ) .
15+ Previously, we introduced to deploy databend using static ` tenant_id ` and ` cluster_id ` in the [ deployment] ( https://docs.databend.com/guides/deploy/deploy/production/metasrv-deploy#step-2-deploy-query-nodes ) .
1616
1717For on-premise deployments to be successful, it's essential to have a skilled DevOps team in place to effectively manage the deployment and configuration. This includes:
18181 . Strategically routing queries to various clusters to enhance concurrency during peak usage times.
@@ -69,7 +69,6 @@ show online nodes;
6969
7070┌──────────────────────────────────────────────────────────────────────────────────────────- ─────┐
7171│ id │ type │ node_group │ warehouse │ cluster │ version │
72- │ String │ String │ String │ String │ String │ String │
7372├────────────────────────┼───────────────┼────────────┼───────────┼─────────┼────────────────────┤
7473│ 9rabYMxa0ReDyZe6F9igH5 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
7574│ CbzfLlTVO29EhkZXdeR625 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
@@ -82,7 +81,6 @@ show online nodes;
8281│ ilPer0ps5wWnEDOLIlk821 │ SystemManaged │ infra_node │ │ │ v1 .2 .686 - nightly │
8382│ shnWu1TC41sAxVwJMIVQF3 │ SystemManaged │ infra_node │ │ │ v1 .2 .686 - nightly │
8483└───────────────────────────────────────────────────────────────────────────────────────────-- -──┘
85- 10 rows read in 0 .131 sec. Processed 0 rows, 0 B (0 row/ s, 0 B/ s)
8684```
8785
8886### Create a single cluster warehouse with 2 nodes
@@ -92,15 +90,13 @@ root@localhost:8000/default> create warehouse test_warehouse_1 with warehouse_si
9290
9391create warehouse test_warehouse_1 with warehouse_size = 2
9492
95- 0 row written in 0 .015 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
9693
9794root@localhost:8000 / default> show online nodes;
9895
9996show online nodes
10097
10198┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
10299│ id │ type │ node_group │ warehouse │ cluster │ version │
103- │ String │ String │ String │ String │ String │ String │
104100├────────────────────────┼───────────────┼────────────┼──────────────────┼─────────┼─────────────────────────────┤
105101│ 9rabYMxa0ReDyZe6F9igH5 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
106102│ CbzfLlTVO29EhkZXdeR625 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
@@ -113,7 +109,6 @@ show online nodes
113109│ ilPer0ps5wWnEDOLIlk821 │ SystemManaged │ infra_node │ │ │ v1 .2 .686 - nightly │
114110│ shnWu1TC41sAxVwJMIVQF3 │ SystemManaged │ infra_node │ │ │ v1 .2 .686 - nightly │
115111└────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
116- 10 rows read in 0 .130 sec. Processed 0 rows, 0 B (0 row/ s, 0 B/ s)
117112```
118113
119114### Get all existing warehouses
@@ -125,11 +120,9 @@ show warehouses
125120
126121┌───────────────────────────────────────────┐
127122│ warehouse │ type │ status │
128- │ String │ String │ String │
129123├────────────────┼────────────────┼─────────┤
130124│ test_warehouse │ System- Managed │ Running │
131125└───────────────────────────────────────────┘
132- 1 row read in 0 .130 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
133126```
134127
135128### Use one of the existing warehouses to run query
@@ -140,20 +133,17 @@ root@localhost:8000/default> use warehouse test_warehouse_1;
140133
141134use warehouse test_warehouse_1
142135
143- 0 row read in 0 .014 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
144136
145137root@(test_warehouse_1)/ default> select * from system .clusters ;
146138
147139SELECT * FROM system .clusters
148140
149141┌───────────────────────────────────────────────────────────────────────────────────────────┐
150142│ name │ cluster │ host │ port │ version │
151- │ String │ String │ String │ UInt16 │ String │
152143├────────────────────────┼──────────────────────────┼───────────┼────────┼──────────────────┤
153144│ SoZcaT4gmhVoGKcChlDw93 │ test_warehouse_1/ default │ 127 .0 .0 .1 │ 27498 │ v1 .2 .686 - nightly │
154145│ Zu7rmhVZ2s2HqTUCdFBdu2 │ test_warehouse_1/ default │ 127 .0 .0 .1 │ 29798 │ v1 .2 .686 - nightly │
155146└───────────────────────────────────────────────────────────────────────────────────────────┘
156- 2 rows read in 0 .679 sec. Processed 2 rows, 350 B (2 .95 rows/ s, 515 B/ s)
157147```
158148
159149### Add clusters to an existing warehouse
@@ -168,15 +158,13 @@ root@localhost:8000/default> alter warehouse test_warehouse add cluster test_clu
168158
169159alter warehouse test_warehouse add cluster test_cluster with cluster_size = 3
170160
171- 0 row written in 0 .039 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
172161
173162root@localhost:8000 / default> show online nodes;
174163
175164show online nodes
176165
177166┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
178167│ id │ type │ node_group │ warehouse │ cluster │ version │
179- │ String │ String │ String │ String │ String │ String │
180168├────────────────────────┼───────────────┼────────────┼────────────────┼──────────────┼─────────────────────────────┤
181169│ 9rabYMxa0ReDyZe6F9igH5 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
182170│ CbzfLlTVO29EhkZXdeR625 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
@@ -202,15 +190,13 @@ root@localhost:8000/default> create warehouse test_warehouse(assign 1 nodes from
202190
203191create warehouse test_warehouse(assign 1 nodes from log_node, assign 2 nodes from infra_node)
204192
205- 0 row written in 0 .013 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
206193
207194root@localhost:8000 / default> show online nodes;
208195
209196show online nodes
210197
211198┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
212199│ id │ type │ node_group │ warehouse │ cluster │ version │
213- │ String │ String │ String │ String │ String │ String │
214200├────────────────────────┼───────────────┼────────────┼────────────────┼─────────┼─────────────────────────────┤
215201│ 6yCaMTMAZbP6nSsNfzkSG5 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
216202│ 8g0E9LxG3mk2eBhKNT9DT2 │ SystemManaged │ log_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
@@ -223,7 +209,6 @@ show online nodes
223209│ s7Yfg7OgXPHAX7pETAbcc │ SystemManaged │ dev_node │ │ │ v1 .2 .686 - nightly │
224210│ tM8lj2NOTTtTwjnQIzCwI6 │ SystemManaged │ infra_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
225211└──────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
226- 10 rows read in 0 .128 sec. Processed 0 rows, 0 B (0 row/ s, 0 B/ s)
227212```
228213
229214#### Add a cluster to an existing warehouse, cluster nodes come from different node groups
@@ -232,14 +217,12 @@ root@localhost:8000/default> alter warehouse test_warehouse add cluster test_clu
232217
233218alter warehouse test_warehouse add cluster test_cluster (assign 1 nodes from dev_node, assign 1 nodes from infra_node)
234219
235- 0 row written in 0 .034 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
236220
237221root@localhost:8000 / default> show online nodes;
238222
239223show online nodes
240224┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
241225│ id │ type │ node_group │ warehouse │ cluster │ version │
242- │ String │ String │ String │ String │ String │ String │
243226├────────────────────────┼───────────────┼────────────┼────────────────┼──────────────┼─────────────────────────────┤
244227│ DZB0EWAz4EiR9UnndkQY92 │ SystemManaged │ dev_node │ │ │ v1 .2 .686 - nightly │
245228│ GFkSBv96W9bWBa85n5sC87 │ SystemManaged │ infra_node │ │ │ v1 .2 .686 - nightly │
@@ -252,7 +235,6 @@ show online nodes
252235│ wXgSNxxOTOkjazEPLbDVF3 │ SystemManaged │ infra_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
253236│ xqWmN2SR1wRjMUt4T2Oy66 │ SystemManaged │ dev_node │ test_warehouse │ test_cluster │ v1 .2 .686 - nightly │
254237└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
255- 10 rows read in 0 .128 sec. Processed 0 rows, 0 B (0 row/ s, 0 B/ s)
256238```
257239
258240#### Add nodes to an existing warehouse, cluster nodes come from different node groups
@@ -262,15 +244,13 @@ root@localhost:8000/default> alter warehouse test_warehouse assign nodes(assign
262244
263245alter warehouse test_warehouse assign nodes(assign 1 nodes from dev_node for default, assign 1 nodes from infra_node for default)
264246
265- 0 row written in 0 .075 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
266247
267248root@localhost:8000 / default> show online nodes;
268249
269250show online nodes
270251
271252┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
272253│ id │ type │ node_group │ warehouse │ cluster │ version │
273- │ String │ String │ String │ String │ String │ String │
274254├────────────────────────┼───────────────┼────────────┼────────────────┼─────────┼─────────────────────────────┤
275255│ 6yCaMTMAZbP6nSsNfzkSG5 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
276256│ 8g0E9LxG3mk2eBhKNT9DT2 │ SystemManaged │ log_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
@@ -283,7 +263,6 @@ show online nodes
283263│ s7Yfg7OgXPHAX7pETAbcc │ SystemManaged │ dev_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
284264│ tM8lj2NOTTtTwjnQIzCwI6 │ SystemManaged │ infra_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
285265└──────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
286- 10 rows read in 0 .139 sec. Processed 0 rows, 0 B (0 row/ s, 0 B/ s)
287266```
288267
289268#### Remove Nodes from cluster of a Warehouse by Node Group
@@ -293,15 +272,13 @@ root@localhost:8000/default> alter warehouse test_warehouse unassign nodes(unass
293272
294273alter warehouse test_warehouse unassign nodes(unassign 1 nodes from dev_node for default, unassign 2 nodes from infra_node for default)
295274
296- 0 row written in 0 .028 sec. Processed 0 row, 0 B (0 row/ s, 0 B/ s)
297275
298276root@localhost:8000 / default> show online nodes;
299277
300278show online nodes
301279
302280┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
303281│ id │ type │ node_group │ warehouse │ cluster │ version │
304- │ String │ String │ String │ String │ String │ String │
305282├────────────────────────┼───────────────┼────────────┼────────────────┼─────────┼─────────────────────────────┤
306283│ 6yCaMTMAZbP6nSsNfzkSG5 │ SystemManaged │ log_node │ │ │ v1 .2 .686 - nightly │
307284│ 8g0E9LxG3mk2eBhKNT9DT2 │ SystemManaged │ log_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
@@ -314,5 +291,4 @@ show online nodes
314291│ s7Yfg7OgXPHAX7pETAbcc │ SystemManaged │ dev_node │ │ │ v1 .2 .686 - nightly │
315292│ tM8lj2NOTTtTwjnQIzCwI6 │ SystemManaged │ infra_node │ test_warehouse │ default │ v1 .2 .686 - nightly │
316293└──────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
317- 10 rows read in 0 .128 sec. Processed 0 rows, 0 B (0 row/ s, 0 B/ s)
318- ```
294+ ```
0 commit comments