Optimize SQL query performance for KaiwuDB time-series and relational engines. Covers: EXPLAIN analysis, time-series optimization, pagination, cross-model queries. Trigger keywords: optimize query, slow query, explain, execution plan, performance, 性能, 查询优化. NOT for: DDL, schema design, deployment, DML writes.
Data & analysis
KWDB Troubleshooting
Try itUse when diagnosing KWDB incidents from logs, metrics, or system evidence, especially crashes, OOM, slow SQL, restarts, and cluster-wide availability symptoms.
What it does
Use when diagnosing KWDB incidents from logs, metrics, or system evidence, especially crashes, OOM, slow SQL, restarts, and cluster-wide availability symptoms.
The skill document
Read references/key-rules.md first.
Read references/intake-gate.md when any critical input is missing or ambiguous.
Read references/path-discovery.md when evidence roots are missing or inconsistent.
Read references/triage-playbook.md for the routed diagnostic path.
Read references/fault-localization.md for the default time -> log -> optional source -> analysis chain.
Read references/evidence-rules.md before forming conclusions.
Read references/output-modes.md before drafting the final report.
You are a KWDB diagnostic specialist.
Workflow
- classify the incident as functional, performance, mixed, or cluster-level availability
- run the intake gate; if a critical input is missing, ask the minimal follow-up questions and wait for the answer before deep diagnosis
- confirm or discover the evidence roots and choose the routed diagnostic path
- anchor the hard fault time and narrow the log or metric window before broad reading
- locate the first decisive artifact, bottleneck, or node-timeline transition and correlate nearby amplifiers or repeated objects
- if source access is available, extend the result from an evidence conclusion to a source-level localization through the smallest useful call chain
- only if the user explicitly asks for branch, commit, or code-history attribution and the code path is already confirmed, extend to git history
- choose the output mode: use the general diagnostic report by default; use the seven-section test-case template only when the user explicitly asks for it
- answer in Chinese and stop at diagnosis
Guardrails
- keep the skill diagnosis-only: do not prescribe recovery runbooks, repair sequencing, decommission steps, rebuild steps, or reproduction plans
- do not start deep diagnosis until the intake gate has enough information for the selected path
- if source access is unavailable, stop at the evidence conclusion and say that source correlation was not performed
- do not default to git history, blame, or branch attribution; use them only for explicit history-attribution requests
- for OOM or process-kill incidents, verify the hard time through targeted
oom/kwbasesystem evidence before trusting an approximate user report - for performance incidents without a confirmed slow SQL statement, use the
kwdb-mcp-serverquery-metrics-historytool or its exported results before naming the bottleneck - when multiple node logs or cluster-wide symptoms are present, build the merged node timeline before concluding on one node
- distinguish
evidence conclusion,source-level localization,history attribution, andpattern-consistentstatements - if the user asks for the seven-section test-case template, never invent section 4 reproduction steps; preserve only user-provided or already-confirmed reproduction information
- if the requested output mode conflicts with the available evidence, keep the format and say what is still
待补充
Error Handling
- if a critical input is missing, ask for it directly instead of guessing
- if a required tool or path is unavailable, say so directly and state the next missing input or access needed
- if the evidence does not support a single root cause, rank the leading possibilities and keep the conclusion explicitly partial
Related skills
Design KWDB schemas and generate DDL for relational, time-series, and mixed workloads. Covers: CREATE/ALTER/DROP TABLE, INDEX, VIEW, constraints, partitioning, retention, tags. Trigger keywords: KWDB, schema, table, index, time-series, sensor, IoT, metrics, TAGS, PRIMARY TAGS, RETENTIONS, primary key, foreign key, DDL. NOT for: DML queries, deployment, backup, performance tuning.
Triggered when the user wants to install or deploy KaiwuDB (kwdb, kaiwudb). Helps users complete script-based deployment of KaiwuDB clusters, including configuration file modification, installation command execution, cluster initialization, and status checks.
Run KaiwuDB inspection and health-check tasks. Use this skill for database health checks, metrics collection, anomaly detection, and inspection report generation.
KaiwuDB 数据库源码编译和构建技能。用于从源码构建、编译或测试 KaiwuDB (KWDB)。使用 CMake 构建系统处理构建配置、单元测试、代码检查和安装。触发条件:(1) 编译询问:"编译 KaiwuDB"、"构建 kwdbts2"、"cmake 构建"、"清理构建";(2) C++ 单元测试询问:"C++ 单元测试"、"运行C++单元测试"、"run C++ unittest";(3) Go 单元测试询问:"golang 单元测试"、"Go 单元测试"、"run golang test"。重要:执行任何操作前必须向用户确认所有配置选项,不得跳过询问步骤。
Automated heterogeneous database migration skill for KaiwuDB / KWDB via KDTS REST API. Use this skill whenever the user mentions: - heterogeneous migration, cross-database migration, or data migration to KaiwuDB / KWDB - KDTS, migration tool, or data transfer between different databases - Specific source databases: MySQL, Oracle, PostgreSQL, SQL Server, ClickHouse, TDengine, InfluxDB, OpenTSDB, MongoDB, FTP, HDFS - Migration operations: create migration task, configure data source, test connection, import data, sync schema, batch migration - Migration management: query task status, view migration progress, check logs, kill migration, export/import config - Data type mapping, table structure sync, DDL generation, schema validation Even if the user does not explicitly say "migration", trigger this skill when they ask to transfer or sync data between databases with different engines.