Skip to main content

Questions tagged [clickhouse]

Use this tag when referencing Yandex' ClickHouse database management system.

Filter by
Sorted by
Tagged with
0 votes
0 answers
102 views

How to sync tables between ClickHouse replicas?

Configuration was 1 shard with 2 replicas (node01 and node02). I have added new server into cluster configuration: node03 <clickhouse> <remote_servers> <supercluster> ...
Mikhail Aksenov's user avatar
0 votes
1 answer
293 views

How to check user settings in ClickHouse

I have a user created by SQL command. I know there is the getSetting() function to check user settings. e.g. : SELECT getSetting('async_insert'); But how to check other users' settings if you are a ...
Mikhail Aksenov's user avatar
0 votes
0 answers
219 views

Calculate the sum of minutes between statuses Clickhouse

There is a table in ClickHouse that is constantly updated, format: date_time | shop_id | item_id | status | balance --------------------------------------------------------------- 2022-09-09 ...
Kirill_K's user avatar
-1 votes
1 answer
351 views

How to create pre-computed tables in order to speed up the query speed

One of the issues that I am encountering presently is that we have certain very large tables (>10 Million rows).When we reference these large tables or create joins, the speed of query is extremely ...
databasequestion's user avatar
3 votes
2 answers
288 views

More efficient accumulator in SQL?

I'm writing a ledger system where every transaction can have multiple classifications. For example, if someone purchases a widget for $50, I can categorize that transaction as having an account of &...
poundifdef's user avatar
-1 votes
1 answer
148 views

ClickHouse MV is not working perfectly as i need [closed]

I’m new to ClickHouse and having an issue with MV. I have a record table which is the data source. I’m inserting all the data here. Then created another table called adv_general_report using ...
Aniruddha Chakraborty's user avatar
0 votes
0 answers
50 views

How do i design a schema with proper DB engine to accumulate data depending on this need on clickhouse or in any other database?

We're a new Adtech company and I was planning to design a database where I'll pull all the data to a single table and then make new tables with a materialized views for others to generate multiple ...
Aniruddha Chakraborty's user avatar
1 vote
1 answer
3k views

Clickhouse OPTIMIZE performance for deduplication

I want to try and understand the performance of the OPTIMIZE query in Clickhouse. I am planning on using it to remove duplicates right after a bulk insert from a MergeTree, hence I have the options of:...
AmyChodorowski's user avatar
1 vote
1 answer
598 views

How to backup clickhouse over SSH?

In postgreSQL, I usually run this command to backup and compress (since my country have really low bandwidth) from server to local: mkdir -p tmp/backup ssh sshuser@dbserver -p 22 "cd /tmp; ...
Kokizzu's user avatar
  • 1,373
1 vote
1 answer
2k views

Mounting Clickhouse data directory to another partition: DB::Exception: Settings profile `default` not found

I'm trying to move clickhouse data directory to another partition /dev/sdb1. So here's what I've done: sudo systemctl stop clickhouse-server mv /var/lib/clickhouse /var/lib/clickhouse-orig mkdir /var/...
Kokizzu's user avatar
  • 1,373
1 vote
1 answer
2k views

Clickhouse Replication without Sharding

How to make replication (1 master, 2 slave for example) in ClickHouse without sharding? All I can see from the examples are always have sharding: Altinity Presentation Docker Compose Example ...
Kokizzu's user avatar
  • 1,373
0 votes
1 answer
92 views

Is Azure Managed Disks enough to ensure high-durability for a database?

I want to set up a database in a high durability set-up on Azure. I've previously relied on DB-as-a-service offerings, but can't do that in this case, so I'd like your feedback on the plan below. Is ...
ServableSoup's user avatar
2 votes
1 answer
126 views

In what cases is using ClickHouseDb and the like a neccessity?

An open source for website analytics - https://github.com/plausible/analytics They use Postgresql and ClickHouseDb. When it comes to web analytics, there're tons of events going that need to be ...
kosmosu05's user avatar
0 votes
1 answer
2k views

Clickhouse create database structure for json data

New to clickhouse and stuck on the database creation structure for importing json data which is nested Take for example the json data that looks like the following when there is data populated "...
p4guru's user avatar
  • 296
3 votes
3 answers
257 views

Continuously move data from server A to Server B while deleting the data in server A?

I'm developing an ad server that is expected to handle ad impressions/billion clicks per day. The most difficult challenge I am facing is moving data from one server to another. Basically the flow ...
Sourabh Swarnkar's user avatar
2 votes
1 answer
735 views

Correlated subqueries. Count Visits after Last Purchase Date

I'm pretty new to SQL and have been trying to solve this task for a while...still no luck. I would appreciate if someone here could help me out. I have a database with columns: ClientID VisitID ...
Edgard Gomez Sennovskaya's user avatar