High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios
High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios
TDengine is an open source, high-performance, cloud native and AI powered time-series database designed for Internet of Things (IoT), Connected Cars, and Industrial IoT. It enables efficient, real-time data ingestion, processing, and analysis of TB and even PB scale data per day, generated by billions of sensors and data collectors. TDengine differentiates itself from other time-series databases with the following advantages:
High Performance: TDengine is the only time-series database to solve the high cardinality issue to support billions of data collection points while out performing other time-series databases for data ingestion, querying and data compression.
Simplified Solution: Through built-in caching, stream processing, data subscription and AI agent features, TDengine provides a simplified solution for time-series data processing. It reduces system design complexity and operation costs significantly.
Cloud Native: Through native distributed design, sharding and partitioning, separation of compute and storage, RAFT, support for kubernetes deployment and full observability, TDengine is a cloud native Time-Series Database and can be deployed on public, private or hybrid clouds.
AI Powered: Through the built in AI agent TDgpt, TDengine can connect to a variety of time series foundation model, large language model, machine learning and traditional algorithms to provide time series data forecasting, anomaly detection, imputation and classification.
Ease of Use: For administrators, TDengine significantly reduces the effort to deploy and maintain. For developers, it provides a simple interface, simplified solution and seamless integrations for third party tools. For data users, it gives easy data access.
Easy Data Analytics: Through super tables, storage and compute separation, data partitioning by time interval, pre-computation and AI agent, TDengine makes it easy to explore, format, and get access to data in a highly efficient way.
Open Source: TDengine's core modules, including cluster feature and AI agent, are all available under open source licenses. It has gathered 23.7k stars on GitHub. There is an active developer community, and over 730k running instances worldwide.
For a full list of TDengine competitive advantages, please check here. The easiest way to experience TDengine is through TDengine Cloud. For the latest TDengine component TDgpt, please refer to TDgpt README for details.
For user manual, system design and architecture, please refer to TDengine Documentation (TDengine 文档)
You can choose to install TDengine via container, installation package, Kubernetes or try fully managed service without installation. This quick guide is for developers who want to contribute, build, release and test TDengine by themselves.
TDengine is built and tested primarily on Linux. macOS builds are supported for local development. Windows support in the open-source tree is limited, so Linux should be your default choice for reproducible builds.
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install -y build-essential cmake gitCentOS/RHEL:
sudo yum groupinstall -y "Development Tools"
sudo yum install -y cmake3 gitNote: CMake >= 3.21 is required for external builds. If your distro provides an older version, install a newer release from https://cmake.org/download/.
You may also need these tools depending on what you build:
tests/sudo apt install ccachetaos-gen component: pip3 install conangit clone https://github.com/taosdata/TDengine.git
cd TDengine
mkdir debug && cd debug
cmake .. -DBUILD_CONTRIB=ON # First build: -DBUILD_CONTRIB=ON is REQUIRED
make -j$(nproc)Important The first source build must use
-DBUILD_CONTRIB=ON. This downloads and builds external dependencies such as xxhash, zstd, and lz4 into.externals/. Subsequent builds can usually omit this flag and reuse the cached artifacts automatically.
Useful variants:
# Release build with CLI tools
cmake .. -DBUILD_CONTRIB=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=ON
make -j$(nproc)
# macOS equivalent parallel build
cmake .. -DBUILD_CONTRIB=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . --parallel "$(sysctl -n hw.ncpu)"Defaults below are the standalone open-source defaults from cmake/options.cmake unless noted otherwise.
| Option | Default | Description |
|---|---|---|
BUILD_CONTRIB |
OFF on Linux, ON elsewhere |
Build third-party dependencies from source. Required for the first build. |
CMAKE_BUILD_TYPE |
Debug |
Standard CMake build type (Debug, Release, RelWithDebInfo). |
BUILD_TEST |
OFF |
Build unit tests with googletest. |
BUILD_TOOLS |
OFF |
Build tools such as taosBenchmark and taosdump. |
BUILD_SANITIZER |
OFF |
Enable sanitizers. |
BUILD_COVERAGE |
OFF |
Enable coverage instrumentation. |
BUILD_JEMALLOC |
OFF |
Enable jemalloc allocator support. |
BUILD_WEBSOCKET |
OFF |
Enable WebSocket support. |
BUILD_ASSERT_NOT_CORE |
OFF |
Avoid generating core files on assert. |
BUILD_PTHREAD_TWEAK |
OFF |
Apply pthread tweaks for older Linux environments. |
BUILD_ASTRA |
OFF |
Build for Astra platform. |
BUILD_ASTRA_RPC |
OFF |
Build with Astra RPC transport. |
BUILD_WITH_LEMON |
ON |
Build with lemon parser support. |
BUILD_WITH_UDF |
ON |
Build with UDF support. |
BUILD_GEOS |
ON |
Build with GEOS support (non-Astra). |
BUILD_SHARED_LIBS |
OFF |
Build shared libraries. |
RUST_BINDINGS |
ON |
Build Rust bindings. |
BUILD_PCRE2 |
ON |
Build with PCRE2 support. |
BUILD_ADDR2LINE |
OFF |
Build addr2line helper support. |
BUILD_WITH_LEVELDB |
OFF |
Enable LevelDB support. |
BUILD_ROCKSDB |
OFF on Linux, ON elsewhere |
Build RocksDB from source. |
ROCKSDB_USE_DEPS |
ON on Linux, OFF elsewhere |
Use prebuilt RocksDB from deps/ instead of building it. |
TD_USE_ROCKSDB |
ON |
Enable RocksDB support. |
BUILD_WITH_LZ4 |
ON |
Build with LZ4 support. |
BUILD_S3 |
ON on Linux, then forced OFF for community builds |
Enable S3-related build path. Community builds switch this off. |
BUILD_WITH_S3 |
ON on Linux, then forced OFF for community builds |
Build with S3 support when available. |
BUILD_WITH_COS |
OFF |
Build with COS support. |
BUILD_WITH_LZMA2 |
ON |
Build with LZMA2 support. |
BUILD_WITH_ANALYSIS |
ON on Linux |
Enable analysis-related build path. |
BUILD_WITH_SQLITE |
OFF |
Build with SQLite support. |
BUILD_WITH_BDB |
OFF |
Build with Berkeley DB support. |
BUILD_WITH_LUCENE |
OFF |
Build with Lucene support. |
BUILD_WITH_NURAFT |
OFF |
Build with NuRaft support. |
BUILD_WITH_UV |
ON |
Build with libuv support. |
BUILD_WITH_UV_TRANS |
ON |
Build with libuv transport support. |
BUILD_DEPENDENCY_TESTS |
ON on Linux |
Build dependency tests. |
BUILD_DOCS |
OFF |
Build Doxygen documentation. |
BUILD_WITH_INVERTEDINDEX |
ON |
Enable inverted index support. |
BUILD_TAOSD_INTEGRATED |
OFF |
Build taosd as an integrated library. |
BUILD_AS_LIB |
OFF |
Build TDengine as a library. |
BUILD_RELEASE |
OFF |
Enable release-version build path. |
BUILD_LIBSASL |
OFF |
Build with libsasl2. |
BUILD_FLEX_DEPLOY |
OFF |
Enable flexible deployment mode. |
BUILD_WITH_RAND_ERR |
OFF |
Enable random error injection. |
BUILD_TSZ_ENABLED |
ON |
Enable TSZ compression support. |
BUILD_USE_PUBLIC_DEPS |
OFF |
Use public internet URLs for external dependencies instead of alternate mirrors. |
Example:
cmake .. -DBUILD_CONTRIB=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TOOLS=ONThe default build tree under debug/ looks like this:
debug/build/bin/taosd — TDengine server daemontaos — TDengine CLI clienttaosBenchmark — benchmark tool (BUILD_TOOLS=ON)taosdump — import/export tool (BUILD_TOOLS=ON)debug/build/lib/libtaos.so on Linux (or the platform-equivalent client library)cd debug
cmake .. -DBUILD_CONTRIB=ON -DBUILD_TEST=ON
make -j$(nproc)
ctest --output-on-failureSome individual test binaries are also emitted into debug/build/bin/.
TDengine includes a Python-based test framework in tests/.
# Build the server and tools first
cd debug
cmake .. -DBUILD_CONTRIB=ON -DBUILD_TOOLS=ON -DBUILD_TEST=ON
make -j$(nproc)
# Start taosd with the generated test configuration
./build/bin/taosd -c test/cfg &
# Run a system test
cd ../tests/system-test
python3 test.py -f 2-query/basic.pyFor more test details, see tests/README.md.
Use source/taos-community/packaging/pack_community_tar.sh after a successful Linux build to assemble the open-source community tarballs.
This script packages only artifacts that are built from the taos-community repository itself:
taosdtaostaosBenchmark (BUILD_TOOLS=ON, when present)taosdump (BUILD_TOOLS=ON, when present)taosudf (when present)libtaos.solibtaosnative.soexamples/c, and the install scriptsIt does not package components that live in o
[aw] Weekly Repository Report failed (pre-agent)
vnode意外损坏,服务无法启动
vgroup leader负载不均
GROUP BY on a VARCHAR column is priced by the declared width, not the data: 10s at VARCHAR(32) vs not completing at VARCHAR(4096) for identical values (3.4.2.5)
GROUP BY is capped at 10,000,000 groups: undocumented, no configuration parameter, enforced only after a full scan (3.4.2.5)
AGG(DISTINCT x) beside an aggregate over an expression fails with Out of range [0x80000112] (3.4.2.5)
GROUP BY ... LIMIT n returns all groups when the query has no ORDER BY (3.4.2.5)
taosd segfaults on COUNT(DISTINCT col) when the deduplicated set spills to disk (3.4.2.5)
taos2.2.2.10 报错Database memory is full ,建不了新表,以及两个vnode同步有问题
taosdump 3.3.4.3 导出数据时吐核