Advanced Search
Search Results
26 total results found
LowCardinality(T)
Description LowCardinality is an optimized column encoding type in ClickHouse, specifically designed to reduce storage space for columns with many duplicate values and accelerate query efficiency. It is particularly suitable for "tags", "status codes", "types...
Data Sharding
数据分片定义 数据分片(Sharding) 是一种将大数据集拆分成多个小数据集并存储在不同服务器上的方法,常用于数据库、分布式存储、对象存储等系统,以提高性能、可扩展性和数据管理效率。 简单来说,分片 = 分而治之,把一大块数据拆成多小块,这样查询、存储和计算都能并行执行,提高效率。 数据分片的常见方式 数据分片一般有 水平分片(Horizontal Sharding) 和 垂直分片(Vertical Sharding) 两种主要方式。 水平分片(Horizontal Sharding) 把同一个表的数据拆分...
Disk Usage SQL
Disk Info SELECT name, path, formatReadableSize(free_space) AS free, formatReadableSize(total_space) AS total FROM system.disks; ┌─name────┬─path─────────────────┬─free───────┬─total──────┐ │ default │ /var/lib/clickhouse/ │ 225.87 GiB │ 491...
Mutations and Processes
Syatem.mutations Get Recently SELECT * FROM system.mutations WHERE is_done = 0 ORDER BY create_time LIMIT 5\G Row 1: ────── database: journal table: otel_logs mutation_id: mutation_6444807.txt command: ...
Shard & Replicas
Table Engine
The MergeTree engine and other engines of the MergeTree family (e.g. ReplacingMergeTree, AggregatingMergeTree ) are the most commonly used and most robust table engines in ClickHouse. Main features of MergeTree family table engines. The primary key does not r...
Table TTL
https://clickhouse.com/docs/sql-reference/functions/date-time-functions Precise TTL TTL is relative to the exact datetime (e.g., 2025-06-05 15:42:30). 1 month - varying daysALTER TABLE journal.otel_logs MODIFY TTL toDateTime(Timestamp) + toIntervalMonth(1); ...
Tomato Data Stats
2025-01-22 Table Size┌─database─┬─table───────────────────┬─size───────┬───────rows─┬───bytes_size─┬─latest_modification─┐ │ system │ part_log_0 │ 110.05 GiB │ 1983769703 │ 118170162389 │ 2025-01-22 00:16:21 │ │ journal │ otel_logs ...
Metrics
MinIO 自身通过 HTTP 提供指标,不需要额外安装 exporter。默认 metrics 地址: http://<minio-host>:9000/minio/v2/metrics/cluster http://<minio-host>:9000/minio/prometheus/metrics 你可以将这个地址配置到 Prometheus 的 scrape_configs 中。
Object Storage Service
OSS 的全称是 Object Storage Service,中文为对象存储服务。 它是一种基于对象(Object)而不是传统文件系统(File)或块存储(Block)的存储方式, 主要用于海量非结构化数据的存储和访问,如图片、视频、备份文件、日志等。 常见供应商 Amazon S3(Simple Storage Service):全球最早、最广泛使用的对象存储服务之一。 阿里云 OSS(Object Storage Service):阿里云的对象存储产品。 腾讯云 COS(Cloud Object Stor...
Deadlock
mysql 5.7 查看事务的阻塞关系 SELECT r.trx_id waiting_trx_id, r.trx_mysql_thread_id waiting_thread, r.trx_query waiting_query, b.trx_id blocking_trx_id, b.trx_mysql_thread_id blocking_thread, b.trx_query blocking_query FROM information_sch...
Kylin OOM
解决Kylin V10 下 MySQL 容器内存占用异常的问题,参考文档https://zhuanlan.zhihu.com/p/679582049?utm_medium=social&utm_psn=1837658450517184512&utm_source=wechat_session ulimit -n 1048576 && ulimit -a >/dev/null && ulimit -n #!/bin/bash set -eo pipefail shopt -s nullglob --- ## l...
openGauss
Official skopeo copy \ --all \ docker://opengauss/opengauss:5.0.0 \ docker://registry.example.com/opengauss/opengauss:5.0.0 docker run -d \ --name opengauss \ -e GS_PASSWORD=foo \ -p 5492:5432 \ registry.example.com/opengauss/opengauss:5.0.0 ...
WAL & Archive Mode
Problem Set wal_keep_size Set archive_mode=on Unset archive_command This will cause wal_keep_size to not work and the disk to fill up. wal_keep_size Controls the minimum number of WAL files that PostgreSQL will retain, even if they have been used by strea...
Split Brain
Architecture
graph TD subgraph Client A[Application] -->|SQL Query| B[TiDB Server] end subgraph TiDB Cluster B -->|Metadata Management| C[PD Server] B -->|Read/Write KV| D[TiKV Cluster] end subgraph TiKV Cluster D1[TiKV...
TiKV Disk Full
Errors ERROR 1105 (HY000): tikv disk full Get Process Info ps aux | grep tikv tidb 26560 42.8 4.8 10024340 6404508 ? Ssl 15:18 13:18 bin/tikv-server --addr 0.0.0.0:21163 --advertise-addr 192.168.48.90:21163 --status-addr 0.0.0.0:21183 --advertise...
MyDumper
https://mydumper.github.io/mydumper/docs/html/index.html Installation macOS brew install mydumper
Quick Count
使用最小覆盖索引 针对 InnoDB 表(几十万到几百万行)快速统计行数,可以有几个方法。下面按实用性和效率排序: 选择最窄的索引列(最好是整型或短列)进行扫描,不访问表数据页。 假设你有一个 updated_at 的索引: SELECT COUNT(updated_at) FROM cert; 优化器会用覆盖索引,只扫描索引页,比全表扫描快很多。 如果想强制使用: SELECT COUNT(updated_at) FROM cert USE INDEX (idx_updated_at); 注意:不...
pt-table-checksum
Installation apt-get -y install percona-toolkit Priviledges 目标库 GRANT SELECT ON foo.* TO 'pttable'@'%'; 校验结果库 GRANT CREATE, INSERT, UPDATE, DELETE ON percona.* TO 'pttable'@'%'; 其它权限 GRANT PROCESS, REPLICATION CLIENT, REPLICATION SLAVE ON *.* TO 'pttable'@...