The Query tab
When you open the Cluster Explorer, you’ll be on the Query tab:
Figure 1 - The Query tab
The text area at the top of the panel lets you run SQL statements by clicking the EXECUTE button. (You can also keep your hands on the keyboard by typing Ctrl or CMD + Enter.)
Beneath the text area are helpful notes with links to ClickHouse® documentation and a couple of example queries.
When you execute a query, the results appear under the text area:
Figure 2 - Query results
Other Controls
There are several other controls above the text area:
Figure 3 - Other controls on the Query tab
The left and right arrows let you move through the queries you’ve executed.
The button brings up the Select User dialog:
Figure 4 - Changing the user to access the cluster
This lets you select the user (and their associated permissions) to run the query. The down arrow lets you choose from the users defined for this cluster. If your account has the necessary permissions, you can also click the link in “Manage ClickHouse users here” to go directly to the user management panel.
If your cluster is enabled to use swarms and you have one or more swarm clusters, you can click the down arrow to select a swarm to speed up your queries. In Figure 3 above, ClickHouse will use the swarm cluster
maddie-swarm.
Finally, the Timeout field lets you define how many seconds ClickHouse should wait for an operation to complete. If you’re working with very large datasets or complex queries, you may need to set this value higher. The default value is 30 seconds.