Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

367 total results found

Tricks

Git

Addons

minikube

Tricks

Prometheus

Data Sharding

ClickHouse Manual

数据分片定义 数据分片(Sharding) 是一种将大数据集拆分成多个小数据集并存储在不同服务器上的方法,常用于数据库、分布式存储、对象存储等系统,以提高性能、可扩展性和数据管理效率。 简单来说,分片 = 分而治之,把一大块数据拆成多小块,这样查询、存储和计算都能并行执行,提高效率。 数据分片的常见方式 数据分片一般有 水平分片(Horizontal Sharding) 和 垂直分片(Vertical Sharding) 两种主要方式。 水平分片(Horizontal Sharding) 把同一个表的数据拆分...

clickhouse
sharding
database

Disk Usage SQL

ClickHouse Manual

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...

database
clickhouse
disk

Mutations and Processes

ClickHouse Manual

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: ...

database
clickhouse
mutation
process

Shard & Replicas

ClickHouse Manual

database
clickhouse
shard
replicas
status
todo

Table Engine

ClickHouse Manual

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...

clickhouse
database
engine

Table TTL

ClickHouse Manual

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); ...

database
clickhouse
ttl

Truncate Table

ClickHouse Manual

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...

clickhouse
truncate

OPTIMIZE Statement

ClickHouse Statements

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...

clickhouse
optimize

Tomato Data Stats

ClickHouse

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 ...

database
clickhouse
stats

Basic Usage

Elasticsearch Manual

Get Health curl -s "http://localhost:9200/_cluster/health?pretty" { "cluster_name" : "docker-cluster", // 集群名称 "status" : "green", // 集群健康状态,green 表示正常 "timed_out" : false, // 查询集群健康时是否超时,false 表示未超时 "number_of_nodes" ...

elasticsearch
commands

Concept

Elasticsearch Manual

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

elasticsearch
concept

Cluster Not Ready

Elasticsearch Troubleshooting

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...

troubleshooting
elasticsearch

Disk Usage

Elasticsearch Troubleshooting

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...

elasticsearch
disk
nfs
troubleshooting

Shard Recovery

Elasticsearch Troubleshooting

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...

elasticsearch
shard
troubleshooting

Metrics

Minio Manual

MinIO 自身通过 HTTP 提供指标,不需要额外安装 exporter。默认 metrics 地址: http://<minio-host>:9000/minio/v2/metrics/cluster http://<minio-host>:9000/minio/prometheus/metrics 你可以将这个地址配置到 Prometheus 的 scrape_configs 中。

database
minio
prometheus
metrics

Object Storage Service

Minio Manual

OSS 的全称是 Object Storage Service,中文为对象存储服务。 它是一种基于对象(Object)而不是传统文件系统(File)或块存储(Block)的存储方式, 主要用于海量非结构化数据的存储和访问,如图片、视频、备份文件、日志等。 常见供应商 Amazon S3(Simple Storage Service):全球最早、最广泛使用的对象存储服务之一。 阿里云 OSS(Object Storage Service):阿里云的对象存储产品。 腾讯云 COS(Cloud Object Stor...

database
minio
oss

mysqldump

MySQL Commands

With DB Creation User --database mysqldump -hlocalhost -uroot -P3306 -pcmajor --databases foo > db-2025-05-09-17-51.sql

database
mysql
mysqldump
commands

Deadlock

MySQL Troubleshooting

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...

database
mysql
deadlock
troubleshooting

Kylin OOM

MySQL Troubleshooting

解决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...

database
mysql
kylin
oom
ulimit

Common SQL

PostgreSQL Manual

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...

database
postgresql
sql