Skip to content

[DRAFT] POC / Get started onboarding revamp #4167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 55 additions & 46 deletions docs/_snippets/_users-and-roles-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,64 +42,73 @@ Create these tables and users to be used in the examples.

#### Creating a sample database, table, and rows {#creating-a-sample-database-table-and-rows}

1. Create a test database
<VerticalStepper headerLevel="h5">

```sql
CREATE DATABASE db1;
```
##### Create a test database {#create-a-test-database}

2. Create a table
```sql
CREATE DATABASE db1;
```

```sql
CREATE TABLE db1.table1 (
id UInt64,
column1 String,
column2 String
)
ENGINE MergeTree
ORDER BY id;
```
##### Create a table {#create-a-table}

3. Populate the table with sample rows
```sql
CREATE TABLE db1.table1 (
id UInt64,
column1 String,
column2 String
)
ENGINE MergeTree
ORDER BY id;
```

```sql
INSERT INTO db1.table1
(id, column1, column2)
VALUES
(1, 'A', 'abc'),
(2, 'A', 'def'),
(3, 'B', 'abc'),
(4, 'B', 'def');
```
##### Populate the table with sample rows {#populate}

4. Verify the table:
```sql
INSERT INTO db1.table1
(id, column1, column2)
VALUES
(1, 'A', 'abc'),
(2, 'A', 'def'),
(3, 'B', 'abc'),
(4, 'B', 'def');
```

```sql
SELECT *
FROM db1.table1
```
##### Verify the table {#verify}

```response
Query id: 475015cc-6f51-4b20-bda2-3c9c41404e49
```sql title="Query"
SELECT *
FROM db1.table1
```

┌─id─┬─column1─┬─column2─┐
│ 1 │ A │ abc │
│ 2 │ A │ def │
│ 3 │ B │ abc │
│ 4 │ B │ def │
└────┴─────────┴─────────┘
```
```response title="Response"
Query id: 475015cc-6f51-4b20-bda2-3c9c41404e49

5. Create a regular user that will be used to demonstrate restrict access to certain columns:
┌─id─┬─column1─┬─column2─┐
│ 1 │ A │ abc │
│ 2 │ A │ def │
│ 3 │ B │ abc │
│ 4 │ B │ def │
└────┴─────────┴─────────┘
```

```sql
CREATE USER column_user IDENTIFIED BY 'password';
```
##### Create `column_user` {#create-a-user-with-restricted-access-to-columns}

6. Create a regular user that will be used to demonstrate restricting access to rows with certain values:
```sql
CREATE USER row_user IDENTIFIED BY 'password';
```
Create a regular user that will be used to demonstrate restrict access to certain columns:

```sql
CREATE USER column_user IDENTIFIED BY 'password';
```

##### Create `row_user` {#create-a-user-with-restricted-access-to-rows-with-certain-values}

Create a regular user that will be used to demonstrate restricting access to rows with certain values:

```sql
CREATE USER row_user IDENTIFIED BY 'password';
```

</VerticalStepper>

#### Creating roles {#creating-roles}

Expand Down
12 changes: 12 additions & 0 deletions docs/best-practices/_snippets/_table_of_contents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
| Page | Description |
|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
| [Choosing a Primary Key](/best-practices/choosing-a-primary-key) | How to select primary keys that maximize query performance and minimize storage overhead. |
| [Select Data Types](/best-practices/select-data-types) | Choose optimal data types to reduce memory usage, improve compression, and accelerate queries. |
| [Use Materialized Views](/best-practices/use-materialized-views) | Leverage materialized views to pre-aggregate data and dramatically speed up analytical queries. |
| [Minimize and Optimize JOINs](/best-practices/minimize-optimize-joins) | Best practices for using ClickHouse's `JOIN` capabilities efficiently. |
| [Choosing a Partitioning Key](/best-practices/choosing-a-partitioning-key) | Select partitioning strategies that enable efficient data pruning and faster query execution. |
| [Selecting an Insert Strategy](/best-practices/selecting-an-insert-strategy) | Optimize data ingestion throughput and reduce resource consumption with proper insert patterns. |
| [Data Skipping Indices](/best-practices/use-data-skipping-indices-where-appropriate) | Apply secondary indices strategically to skip irrelevant data blocks and accelerate filtered queries. |
| [Avoid Mutations](/best-practices/avoid-mutations) | Design schemas and workflows that eliminate costly `UPDATE`/`DELETE` operations for better performance. |
| [Avoid OPTIMIZE FINAL](/best-practices/avoid-optimize-final) | Prevent performance bottlenecks by understanding when `OPTIMIZE FINAL` hurts more than it helps. |
| [Use JSON where appropriate](/best-practices/use-json-where-appropriate) | Balance flexibility and performance when working with semi-structured JSON data in ClickHouse. |
15 changes: 3 additions & 12 deletions docs/best-practices/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,10 @@ hide_title: true
description: 'Landing page for Best Practices section in ClickHouse'
---

import TableOfContents from '@site/docs/best-practices/_snippets/_table_of_contents.md';

# Best Practices in ClickHouse {#best-practices-in-clickhouse}

This section provides the best practices you will want to follow to get the most out of ClickHouse.

| Page | Description |
|----------------------------------------------------------------------|--------------------------------------------------------------------------|
| [Choosing a Primary Key](/best-practices/choosing-a-primary-key) | Guidance on selecting an effective Primary Key in ClickHouse. |
| [Select Data Types](/best-practices/select-data-types) | Recommendations for choosing appropriate data types. |
| [Use Materialized Views](/best-practices/use-materialized-views) | When and how to benefit from materialized views. |
| [Minimize and Optimize JOINs](/best-practices/minimize-optimize-joins)| Best practices for minimizing and optimizing JOIN operations. |
| [Choosing a Partitioning Key](/best-practices/choosing-a-partitioning-key) | How to choose and apply partitioning keys effectively. |
| [Selecting an Insert Strategy](/best-practices/selecting-an-insert-strategy) | Strategies for efficient data insertion in ClickHouse. |
| [Data Skipping Indices](/best-practices/use-data-skipping-indices-where-appropriate) | When to apply data skipping indices for performance gains. |
| [Avoid Mutations](/best-practices/avoid-mutations) | Reasons to avoid mutations and how to design without them. |
| [Avoid OPTIMIZE FINAL](/best-practices/avoid-optimize-final) | Why `OPTIMIZE FINAL` can be costly and how to work around it. |
| [Use JSON where appropriate](/best-practices/use-json-where-appropriate) | Considerations for using JSON columns in ClickHouse. |
<TableOfContents/>
11 changes: 0 additions & 11 deletions docs/cloud-index.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/cloud/_snippets/_security_table_of_contents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
| Page | Description |
|---------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| [Shared Responsibility Model](shared-responsibility-model.md) | Understand how security responsibilities are divided between ClickHouse Cloud and your organization for different service types. |
| [Cloud Access Management](cloud-access-management/index.md) | Manage user access with authentication, single sign-on (SSO), role-based permissions, and team invitations. |
| [Connectivity](connectivity-overview.md) | Configure secure network access including IP allow-lists, private networking, S3 data access, and Cloud IP address management. |
| [Enhanced Encryption](cmek.md) | Learn about default AES 256 encryption and how to enable Transparent Data Encryption (TDE) for additional data protection at rest. |
| [Audit Logging](audit-logging.md) | Set up and use audit logging to track and monitor activities in your ClickHouse Cloud environment. |
| [Privacy and Compliance](privacy-compliance-overview.md) | Review security certifications, compliance standards, and learn how to manage your personal information and data rights. |
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ If your organization has been migrated to one of the [new pricing plans](https:/
You will now also be able to specify the `num_replicas` field as a property of the service resource.
:::

## Terraform and OpenAPI New Pricing: Replica Settings Explained
## Terraform and OpenAPI New Pricing: Replica Settings Explained {#terraform-and-openapi-new-pricing---replica-settings-explained}

The number of replicas each service will be created with defaults to 3 for the Scale and Enterprise tiers, while it defaults to 1 for the Basic tier.
For the Scale and the Enterprise tiers it is possible to adjust it by passing a `numReplicas` field in the service creation request.
The value of the `numReplicas` field must be between 2 and 20 for the first service in a warehouse. Services that are created in an existing warehouse can have a number of replicas as low as 1.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 0 additions & 31 deletions docs/cloud/bestpractices/index.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/cloud/bestpractices/usagelimits.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Cloud console",
"collapsible": true,
"collapsed": true,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Infrastructure and deploy",
"collapsible": true,
"collapsed": true,
}
5 changes: 5 additions & 0 deletions docs/cloud/features/03_monitoring/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Monitoring",
"collapsible": true,
"collapsed": true,
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ interface can help detect issues.
| Network receive bytes/sec | Tracks the current speed of outbound network traffic |
| Concurrent network connections | Tracks the number of current concurrent network connections |

## Identifying issues with the Advanced dashboard {#identifying-issues-with-the-advanced-dashboard}
## Identifying issues using the advanced dashboard {#identifying-issues-with-the-advanced-dashboard}

Having this real-time view of the health of your ClickHouse service greatly helps
mitigate issues before they impact your business or help solve them. Below are a
Expand Down
5 changes: 5 additions & 0 deletions docs/cloud/features/04_security/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Security",
"collapsible": true,
"collapsed": true,
}
Loading
Loading