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
ClickHouse is blazing fast, but understanding ClickHouse and using it effectively is a journey. The documentation is your source for gaining the knowledge you need to be successful with your ClickHouse projects and applications. [Head over to clickhouse.com/docs to learn more →](https://clickhouse.com/)
20
20
21
-
## Table of contents {#table-of-contents}
21
+
## Table of contents
22
22
23
23
-[About this repo](#about-this-repo)
24
24
-[Run locally](#run-locally)
25
25
-[Contributing](#contributing)
26
26
-[Issues](#issues)
27
27
-[License](#license)
28
28
29
-
## About this repo {#about-this-repo}
29
+
## About this repo
30
30
31
31
This repository manages the documentation for [ClickHouse](https://clickhouse.com/docs). The content is built with [Docusaurus](https://docusaurus.io/) and hosted on [Vercel](https://vercel.com). Documentation content is written in Markdown and is held in the `/docs` directory.
32
32
33
-
## Run locally {#run-locally}
33
+
## Run locally
34
34
35
35
You can run a copy of this website locally within a few steps. Some folks find this useful when contributing so they can see precisely what their changes will look like on the production site.
36
36
@@ -116,23 +116,19 @@ To check spelling and markdown is correct locally run:
116
116
yarn check-style
117
117
```
118
118
119
-
### Notes {#notes}
119
+
### Notes
120
120
121
121
Here are some things to keep in mind when building a local copy of the ClickHouse docs site.
122
122
123
-
#### Build-time {#build-time}
124
-
125
-
Due to the complex structure of this repo, the docs site can take some time to build locally. As a benchmark, it takes ~3 minutes to build on an M1 Macbook with 8GB RAM.
126
-
127
-
#### Redirects {#redirects}
123
+
#### Redirects
128
124
129
125
Due to how the local server is built, redirects will not work. For example, visiting `clickhouse.com/docs` on the production site will lead you to `clickhouse.com/docs/intro`. However, on a local copy of the site, you will see a 404 page if you try to visit `localhost:8000/docs`.
130
126
131
-
## Contributing {#contributing}
127
+
## Contributing
132
128
133
129
Want to help out? Contributions are always welcome! If you want to help out but aren't sure where to start, check out the [issues board](https://github.com/clickhouse/clickhouse-docs/issues).
134
130
135
-
### Pull requests {#pull-requests}
131
+
### Pull requests
136
132
137
133
Please assign any pull request (PR) against an issue; this helps the docs team track who is working on what and what each PR is meant to address. If there isn't an issue for the specific _thing_ you want to work on, quickly create one and comment so that it can be assigned to you. One of the repository maintainers will add you as an assignee.
138
134
@@ -153,7 +149,7 @@ yarn check-style
153
149
For an overview of how reference documentation such as settings, system tables
154
150
and functions are generated from the source code, see ["Generating documentation from source code"](/contribute/autogenerated-documentation-from-source.md)
155
151
156
-
### Tests and CI/CD {#tests-and-cicd}
152
+
### Tests and CI/CD
157
153
158
154
There are five workflows that run against PRs in this repo:
159
155
@@ -165,7 +161,7 @@ There are five workflows that run against PRs in this repo:
165
161
| [Scheduled Vercel build](https://github.com/ClickHouse/clickhouse-docs/blob/main/.github/workflows/scheduled-vercel-build.yml) | Builds the site every day at 00:10 UTC and hosts the build on Vercel. |
166
162
| [Trigger build](https://github.com/ClickHouse/clickhouse-docs/blob/main/.github/workflows/trigger-build.yml) | Uses the [peter-evans/repository-dispatch@v2](https://github.com/peter-evans/repository-dispatch) workflow to create a repository dispatch. |
167
163
168
-
### Quick contributions {#quick-contributions}
164
+
### Quick contributions
169
165
170
166
Have you noticed a typo or found some wonky formatting? For small contributions like these, it's usually faster and easier to make your changes directly in GitHub. Here's a quick guide to show you how the GitHub editor works:
171
167
@@ -200,10 +196,10 @@ Have you noticed a typo or found some wonky formatting? For small contributions
200
196
201
197
At this point, your pull request will be handed over to the docs team, who will review it and suggest or make changes where necessary.
202
198
203
-
## Issues {#issues}
199
+
## Issues
204
200
205
201
Found a problem with the Clickhouse docs site? [Please raise an issue](https://github.com/clickhouse/clickhouse-docs/issues/new). Be as specific and descriptive as possible; screenshots help!
206
202
207
-
## License {#license}
203
+
## License
208
204
209
205
This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).
Copy file name to clipboardExpand all lines: docs/_snippets/_users-and-roles-common.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
@@ -269,7 +269,7 @@ Roles are used to define groups of users for certain privileges instead of manag
269
269
Verify that only the above two rows are returned, rows with the value `B`in`column1` should be excluded.
270
270
:::
271
271
272
-
## Modifying Users and Roles {#modifying-users-and-roles}
272
+
## Modifying users and roles {#modifying-users-and-roles}
273
273
274
274
Users can be assigned multiple roles for a combination of privileges needed. When using multiple roles, the system will combine the roles to determine privileges, the net effect will be that the role permissions will be cumulative.
Copy file name to clipboardExpand all lines: docs/about-us/beta-and-experimental-features.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,19 @@ Due to the uncertainty of when features are classified as generally available, w
14
14
15
15
The sections below explicitly describe the properties of **Beta** and **Experimental** features:
16
16
17
-
## Beta Features {#beta-features}
17
+
## Beta features {#beta-features}
18
18
19
19
- Under active development to make them generally available (GA)
20
20
- Main known issues can be tracked on GitHub
21
21
- Functionality may change in the future
22
22
- Possibly enabled in ClickHouse Cloud
23
23
- The ClickHouse team supports beta features
24
24
25
-
The following features are considered Beta in ClickHouse Cloud and are available for use in ClickHouse Cloud Services, even though they may be currently under a ClickHouse SETTING named ```allow_experimental_*```:
25
+
You can find below the features considered Beta in ClickHouse Cloud and are available for use in your ClickHouse Cloud Services.
26
26
27
27
Note: please be sure to be using a current version of the ClickHouse [compatibility](/operations/settings/settings#compatibility) setting to be using a recently introduced feature.
## True Column-Oriented Database Management System {#true-column-oriented-database-management-system}
12
+
## True column-oriented database management system {#true-column-oriented-database-management-system}
13
13
14
14
In a real column-oriented DBMS, no extra data is stored with the values. This means that constant-length values must be supported to avoid storing their length "number" next to the values. For example, a billion UInt8-type values should consume around 1 GB uncompressed, or this strongly affects the CPU use. It is essential to store data compactly (without any "garbage") even when uncompressed since the speed of decompression (CPU usage) depends mainly on the volume of uncompressed data.
15
15
16
16
This is in contrast to systems that can store values of different columns separately, but that cannot effectively process analytical queries due to their optimization for other scenarios, such as HBase, Bigtable, Cassandra, and Hypertable. You would get throughput around a hundred thousand rows per second in these systems, but not hundreds of millions of rows per second.
17
17
18
18
Finally, ClickHouse is a database management system, not a single database. It allows creating tables and databases in runtime, loading data, and running queries without reconfiguring and restarting the server.
19
19
20
-
## Data Compression {#data-compression}
20
+
## Data compression {#data-compression}
21
21
22
22
Some column-oriented DBMSs do not use data compression. However, data compression plays a key role in achieving excellent performance.
23
23
24
24
In addition to efficient general-purpose compression codecs with different trade-offs between disk space and CPU consumption, ClickHouse provides [specialized codecs](/sql-reference/statements/create/table.md#specialized-codecs) for specific kinds of data, which allow ClickHouse to compete with and outperform more niche databases, like time-series ones.
25
25
26
-
## Disk Storage of Data {#disk-storage-of-data}
26
+
## Disk storage of data {#disk-storage-of-data}
27
27
28
28
Keeping data physically sorted by primary key makes it possible to extract data based on specific values or value ranges with low latency in less than a few dozen milliseconds. Some column-oriented DBMSs, such as SAP HANA and Google PowerDrill, can only work in RAM. This approach requires allocation of a larger hardware budget than necessary for real-time analysis.
29
29
30
30
ClickHouse is designed to work on regular hard drives, which means the cost per GB of data storage is low, but SSD and additional RAM are also fully used if available.
31
31
32
-
## Parallel Processing on Multiple Cores {#parallel-processing-on-multiple-cores}
32
+
## Parallel processing on multiple cores {#parallel-processing-on-multiple-cores}
33
33
34
34
Large queries are parallelized naturally, taking all the necessary resources available on the current server.
35
35
36
-
## Distributed Processing on Multiple Servers {#distributed-processing-on-multiple-servers}
36
+
## Distributed processing on multiple servers {#distributed-processing-on-multiple-servers}
37
37
38
38
Almost none of the columnar DBMSs mentioned above have support for distributed query processing.
39
39
40
40
In ClickHouse, data can reside on different shards. Each shard can be a group of replicas used for fault tolerance. All shards are used to run a query in parallel, transparently for the user.
41
41
42
-
## SQL Support {#sql-support}
42
+
## SQL support {#sql-support}
43
43
44
44
ClickHouse supports [SQL language](/sql-reference/) that is mostly compatible with the ANSI SQL standard.
45
45
46
46
Supported queries include [GROUP BY](../sql-reference/statements/select/group-by.md), [ORDER BY](../sql-reference/statements/select/order-by.md), subqueries in [FROM](../sql-reference/statements/select/from.md), [JOIN](../sql-reference/statements/select/join.md) clause, [IN](../sql-reference/operators/in.md) operator, [window functions](../sql-reference/window-functions/index.md) and scalar subqueries.
47
47
48
48
Correlated (dependent) subqueries are not supported at the time of writing but might become available in the future.
49
49
50
-
## Vector Computation Engine {#vector-engine}
50
+
## Vector computation engine {#vector-engine}
51
51
52
52
Data is not only stored by columns but is processed by vectors (parts of columns), which allows achieving high CPU efficiency.
53
53
54
-
## Real-Time Data Inserts {#real-time-data-updates}
54
+
## Real-time data inserts {#real-time-data-updates}
55
55
56
56
ClickHouse supports tables with a primary key. To quickly perform queries on the range of the primary key, the data is sorted incrementally using the merge tree. Due to this, data can continually be added to the table. No locks are taken when new data is ingested.
57
57
58
-
## Primary Indexes {#primary-index}
58
+
## Primary indexes {#primary-index}
59
59
60
60
Having data physically sorted by primary key makes it possible to extract data based on specific values or value ranges with low latency in less than a few dozen milliseconds.
61
61
62
-
## Secondary Indexes {#secondary-indexes}
62
+
## Secondary indexes {#secondary-indexes}
63
63
64
64
Unlike other database management systems, secondary indexes in ClickHouse do not point to specific rows or row ranges. Instead, they allow the database to know in advance that all rows in some data parts would not match the query filtering conditions and do not read them at all, thus they are called [data skipping indexes](../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-data_skipping-indexes).
65
65
66
-
## Suitable for Online Queries {#suitable-for-online-queries}
66
+
## Suitable for online queries {#suitable-for-online-queries}
67
67
68
68
Most OLAP database management systems do not aim for online queries with sub-second latencies. In alternative systems, report building time of tens of seconds or even minutes is often considered acceptable. Sometimes it takes even more time, which forces systems to prepare reports offline (in advance or by responding with "come back later").
69
69
70
70
In ClickHouse "low latency" means that queries can be processed without delay and without trying to prepare an answer in advance, right at the same moment as the user interface page is loading. In other words, online.
71
71
72
-
## Support for Approximated Calculations {#support-for-approximated-calculations}
72
+
## Support for approximated calculations {#support-for-approximated-calculations}
73
73
74
74
ClickHouse provides various ways to trade accuracy for performance:
75
75
76
76
1. Aggregate functions for approximated calculation of the number of distinct values, medians, and quantiles.
77
77
2. Running a query based on a part ([SAMPLE](../sql-reference/statements/select/sample.md)) of data and getting an approximated result. In this case, proportionally less data is retrieved from the disk.
78
78
3. Running an aggregation for a limited number of random keys, instead of for all keys. Under certain conditions for key distribution in the data, this provides a reasonably accurate result while using fewer resources.
ClickHouse adaptively chooses how to [JOIN](../sql-reference/statements/select/join.md) multiple tables, by preferring hash-join algorithm and falling back to the merge-join algorithm if there's more than one large table.
83
83
84
-
## Data Replication and Data Integrity Support {#data-replication-and-data-integrity-support}
84
+
## Data replication and data integrity support {#data-replication-and-data-integrity-support}
85
85
86
86
ClickHouse uses asynchronous multi-master replication. After being written to any available replica, all the remaining replicas retrieve their copy in the background. The system maintains identical data on different replicas. Recovery after most failures is performed automatically, or semi-automatically in complex cases.
87
87
@@ -91,7 +91,7 @@ For more information, see the section [Data replication](../engines/table-engine
91
91
92
92
ClickHouse implements user account management using SQL queries and allows for [role-based access control configuration](/guides/sre/user-management/index.md) similar to what can be found in ANSI SQL standard and popular relational database management systems.
93
93
94
-
## Features that Can Be Considered Disadvantages {#clickhouse-features-that-can-be-considered-disadvantages}
94
+
## Features that can be considered disadvantages {#clickhouse-features-that-can-be-considered-disadvantages}
95
95
96
96
1. No full-fledged transactions.
97
97
2. Lack of ability to modify or delete already inserted data with a high rate and low latency. There are batch deletes and updates available to clean up or modify data, for example, to comply with [GDPR](https://gdpr-info.eu).
0 commit comments