ClickHouse

What Is ClickHouse?

ClickHouse® is a high-performance, column-oriented SQL database management system (DBMS) for online analytical processing (OLAP).

What is OLAP?

OLAP scenarios require real-time responses on top of large datasets for complex analytical queries with the following characteristics:

Datasets can be massive - billions or trillions of rows

Data is organized in tables that contain many columns

Only a few columns are selected to answer any particular query

Results must be returned in milliseconds or seconds

Column-Oriented vs Row-Oriented Databases

In a row-oriented DBMS, data is stored in rows, with all the values related to a row physically stored next to each other.

In a column-oriented DBMS, data is stored in columns, with values from the same columns stored together.

Software Included

Package Version License
ClickHouse 23.10.4.25 Apache License 2.0

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating a Droplet from the ClickHouse 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB ClickHouse Droplet in the SFO2 region, you can use the following curl command. You need to either save your API access token) to an environment variable or substitute it in the command below.

curl -X POST -H 'Content-Type: application/json' \
         -H 'Authorization: Bearer '$TOKEN'' -d \
        '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "clickhouse"}' \
        "https://api.digitalocean.com/v2/droplets"

Getting Started After Deploying ClickHouse

After the app is installed, it’s required to login to the droplet. ClickHouse will generate a new password and start the server. If something went wrong and you’ll miss the generated password, you can use DO utility to generate new password. It’s located in /opt/digitalocean_clickhouse/setup_password.sh.