22. How it works
•CK架构
Data Storage
MergeTree
ReplicatedMergeTree
ReplacingMergeTree
SummingMergeTree
Log
Memory
Buffer
Client
PHP JDBC
Python
Golang
Data Type SQL
ODBC
Cluster
Access Quotas
Kafka
Distributed
MaterializedView
Node.js
R
Scala
Julia
Rust
C++
Perl
Ruby .NET
HTTP
Functions
49. 回写MySQL
直接查MySQL数据
Limit 10 by date
直接查数据⽂文件Best practice
INSERT INTO FUNCTION
mysql('host:port', 'db', 'tb', 'user', 'passwd', 1)
SELECT xxx
CREATE TABLE xxxx
ENGINE = MergeTree ORDER BY id AS
SELECT *
FROM mysql('host:port', 'db', 'tb', 'user', 'password')
clickhouse-client
--query="SELECT partition, count() AS
number_of_parts,
formatReadableSize(sum(bytes)) AS
sum_size FROM xxx
WHERE xxxxx ;"
--external --file=test.sql --name=parts
--structure='partition UInt16,name
String,table String,engine String'
-h 127.0.0.1
GROUP BY
xxxx
ORDER BY
xxxx
LIMIT 10 BY date, city;