0
votes

I have a demand for 10 billion detailed data query. 10 billion data is stored in the Clickhouse. Do I need to separate databases and tables? The table engine I use is ReplicatedReplacingMergeTree The query statement is as follows:

select * from table_a where name = 'akkj';

select * from table_b where name = 'bttc';

1

1 Answers

1
votes

No, you can store any number of rows in a single table.

My production:

SELECT count()
FROM fact_event_shard

┌───────count()─┐
│ 1415809324034 │
└───────────────┘

select * from table_a where name = 'akkj'; select * from table_b where name = 'bttc';

Very bad idea. Clickhouse does not like such queries. You should use Cassandra, not Clichkouse.