Resolve issues with DoubleCloud Managed ClickHouse®

On a rare occasion, your Managed ClickHouse® cluster may not work as expected. Our experience shows that you can fix a significant portion of these cases without a need to contact technical support.

This article covers the following topics:

Copy an existing Managed ClickHouse® cluster

To copy your existing ClickHouse® cluster, you can use Transfer or export to CSV.

  1. Create a new Managed ClickHouse® cluster.

  2. Export the tables you need to a CSV file using with the following query in the ClickHouse® client:

    <native_interface_connection_string> \
    --query="SELECT * from <database_name>.<table_name>" > <file_name>.csv
    
  3. Upload the CSV file to your ClickHouse® cluster.

Change the maximum query size for a ClickHouse® cluster

You can configure the max query size for your cluster using the ClickHouse® client:

  1. Go to the Clusters page in the console.

  2. Select the cluster where you want to change the maximum query size.

  3. On the cluster's information page, find the Native interface connection string and click Copy.

  4. Paste the connection string into the terminal, but don’t run it yet.

  5. To the end of your connection string, add the following:

    --max_query_size=<size>
    

    Replace <size> with the desired query size in bytes, such as 65536.

  6. Run the command

Tip

To change the maximum query size in a session that's already running, use the following statement:

SET max_query_size = <size>

Replace <size> with the desired query size in bytes, such as 65536.

To permanently change the maximum query size for a single user, run the following statement connecting to your cluster in the ClickHouse® client:

ALTER USER <username> SETTINGS max_query_size = <size>

Replace <size> with the desired query size in bytes, such as 65536.

To set the maximum query size for multiple users, consider creating a settings profile with the following statement:

CREATE SETTINGS PROFILE <profile_name> SETTINGS max_query_size = <size> TO <users>

Replace the following:

  • <profile_name>: name of the settings profile, such as max_query_size_profile.

  • <size>: the desired query size in bytes, such as 65536.

  • <users>: list of users you want to apply the settings profile to.

Change the maximum number of result rows

You may want to change the maximum number of result rows if a query result doesn't contain all the data.

  1. Go to the Clusters page in the console.

  2. Select the cluster where you want to change the maximum number of rows.

  3. On the cluster's information page, find the Native interface connection string and click Copy.

  4. Paste the connection string into the terminal, but don’t run it yet.

  5. To the end of your connection string, add the following:

    --max_result_rows=<rows>
    

    Replace <rows> with the maximum number of rows you want to get, such as 32768.

  6. Run the command.

To permanently change the max number of result rows a single user, run the following statement after connecting to your cluster in the ClickHouse® client:

SET max_result_rows = <rows>

Replace <rows> with the maximum number of rows you want to get, such as 32768.