You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/best-practices/using_data_skipping_indices.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ LIMIT 1
140
140
A simple analysis shows that `ViewCount` is correlated with the `CreationDate` (a primary key) as one might expect - the longer a post exists, the more time it has to be viewed.
141
141
142
142
```sql
143
-
SELECT toDate(CreationDate) as day, avg(ViewCount) as view_count FROMstackoverflow.postsWHERE day >'2009-01-01'GROUP BY day
143
+
SELECT toDate(CreationDate) AS day, avg(ViewCount) AS view_count FROMstackoverflow.postsWHERE day >'2009-01-01'GROUP BY day
144
144
```
145
145
146
146
This therefore makes a logical choice for a data skipping index. Given the numeric type, a min_max index makes sense. We add an index using the following `ALTER TABLE` commands - first adding it, then "materializing it".
Copy file name to clipboardExpand all lines: docs/cloud/get-started/query-endpoints.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,16 +29,16 @@ If you have a saved query, you can skip this step.
29
29
Open a new query tab. For demonstration purposes, we'll use the [youtube dataset](/getting-started/example-datasets/youtube-dislikes), which contains approximately 4.5 billion records. As an example query, we'll return the top 10 uploaders by average views per video in a user-inputted `year` parameter:
30
30
31
31
```sql
32
-
withsum(view_count) as view_sum,
33
-
round(view_sum / num_uploads, 2) as per_upload
34
-
select
32
+
WITHsum(view_count) AS view_sum,
33
+
round(view_sum / num_uploads, 2) AS per_upload
34
+
SELECT
35
35
uploader,
36
-
count() as num_uploads,
37
-
formatReadableQuantity(view_sum) as total_views,
38
-
formatReadableQuantity(per_upload) as views_per_video
39
-
from
36
+
count() AS num_uploads,
37
+
formatReadableQuantity(view_sum) AS total_views,
38
+
formatReadableQuantity(per_upload) AS views_per_video
39
+
FROM
40
40
youtube
41
-
where
41
+
WHERE
42
42
toYear(upload_date) = {year: UInt16}
43
43
group by uploader
44
44
order by per_upload desc
@@ -149,7 +149,7 @@ To upgrade the endpoint version from `v1` to `v2`, include the `x-clickhouse-end
149
149
**Query API Endpoint SQL:**
150
150
151
151
```sql
152
-
SELECT database, name as num_tables FROMsystem.tableslimit3;
152
+
SELECT database, name AS num_tables FROMsystem.tablesLIMIT3;
Copy file name to clipboardExpand all lines: docs/cloud/get-started/sql-console.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,17 +251,17 @@ Query result sets can be easily exported to CSV format directly from the SQL con
251
251
Some data can be more easily interpreted in chart form. You can quickly create visualizations from query result data directly from the SQL console in just a few clicks. As an example, we'll use a query that calculates weekly statistics for NYC taxi trips:
Copy file name to clipboardExpand all lines: docs/cloud/reference/warehouses.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -135,8 +135,8 @@ Once compute-compute is enabled for a service (at least one secondary service wa
135
135
6.**CREATE/RENAME/DROP DATABASE queries could be blocked by idled/stopped services by default.** These queries can hang. To bypass this, you can run database management queries with `settings distributed_ddl_task_timeout=0` at the session or per query level. For example:
136
136
137
137
```sql
138
-
createdatabasedb_test_ddl_single_query_setting
139
-
settings distributed_ddl_task_timeout=0
138
+
CREATEDATABASEdb_test_ddl_single_query_setting
139
+
SETTINGS distributed_ddl_task_timeout=0
140
140
```
141
141
142
142
6.**In very rare cases, secondary services that are idled or stopped for a long time (days) without waking/starting up can cause performance degradation to other services in the same warehouse.** This issue will be resolved soon and is connected to mutations running in the background. If you think you are experiencing this issue, please contact ClickHouse [Support](https://clickhouse.com/support/program).
0 commit comments