Advanced Search
Search Results
240 total results found
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); ...
Truncate Table
TRUNCATE TABLE default.jaeger_span; It will report error Reason: 1. Size (51.37 GB) is greater than max_[table/partition]_size_to_drop (50.00 GB) 2. File '/bitnami/clickhouse/data/flags/force_drop_table' intended to force DROP doesn't exist How to fix this: 1...
OPTIMIZE Statement
https://clickhouse.com/docs/sql-reference/statements/optimize Introduction Merge Multiple Parts into Fewer or Single Parts Merges multiple data parts (files) into one, reducing fragmentation and improving query performance. Only affects parts within the sam...
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 ...
Basic Usage
Get Health curl -s "http://localhost:9200/_cluster/health?pretty" { "cluster_name" : "docker-cluster", // 集群名称 "status" : "green", // 集群健康状态,green 表示正常 "timed_out" : false, // 查询集群健康时是否超时,false 表示未超时 "number_of_nodes" ...
Concept
Concept Database Description Index Table Stores a collection of documents Document Row JSON formatted data entity Field Column Document field with specific type Mapping Schema Defines field names, types, and indexing rules
Cluster Not Ready
You said: Warning Unhealthy 33s (x6045 over 14h) kubelet Readiness probe failed: Waiting for elasticsearch cluster to become ready (request params: "wait_for_status=yellow&timeout=3s" ) Cluster is not yet ready (request params: "wait_for_status=yellow&tim...
Disk Usage
Errors [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block] { "type": "server", "timestamp": "2025-02-11T19:04:17,088Z", "level": "WARN", "component": "o.e.c.r.a.DiskThresholdMonitor", "cluster.na...
Shard Recovery
Check State curl http://localhost:9200/_cluster/health?pretty { "cluster_name" : "elasticsearch", "status" : "yellow", "timed_out" : false, "number_of_nodes" : 1, "number_of_data_nodes" : 1, "active_primary_shards" : 1191, "active_shards" : 119...
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...
mysqldump
With DB Creation User --database mysqldump -hlocalhost -uroot -P3306 -pcmajor --databases foo > db-2025-05-09-17-51.sql
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...
Common SQL
Get Process Start Time SELECT pg_postmaster_start_time(); Show Config File SHOW config_file; Show Max Connections SHOW max_connections; Get Total Activity Connections SELECT COUNT(*) AS total_connections FROM pg_stat_activity; Activity Connections Sta...