yugabyte-db README

The project's README from github.com/yugabyte/yugabyte-db. As one markdown file: README.md.

YugabyteDB

License Documentation Status Ask in forum Slack chat Analytics

What is YugabyteDB?

YugabyteDB is a PostgreSQL-compatible, high-performance, cloud-native, distributed SQL database. It combines the benefits of traditional relational databases with the scalability of NoSQL systems, making it suitable for applications that require both transactional consistency and the ability to handle large amounts of data. It is best suited for cloud-native OLTP (that is, real-time, business-critical) applications that need absolute data correctness and require at least one of the following: scalability, high tolerance to failures, or globally-distributed deployments.

Core Features

YugabyteDB was created with several key design goals in mind, aiming to address the challenges faced by modern, cloud-native applications while maintaining the familiarity and power of traditional relational databases. Read more about these in our Design goals.

Get Started

Can't find what you're looking for? Have a question? Post your questions or comments on our Community Slack or Forum.

Build Applications

YugabyteDB supports many languages and client drivers, including Java, Go, NodeJS, Python, and more. For a complete list, including examples, see Drivers and ORMs.

Current Roadmap

The following is a list of some of the key features being worked on for upcoming releases.

Feature Details
PostgreSQL 15 Compatibility For latest features, new PostgreSQL extensions, performance, and community fixes.
PostgreSQL Publication/Replication slot API in CDC PostgreSQL has a huge community that needs a PG-compatible API to set up and consume database changes.
Bitmap scan Bitmap Scan support for using Index Scans, remote filter and enhanced Cost Model.
Cost based optimizer(CBO) Efficient query plans based on statistics (such as table size, number of rows) and data distribution.
Parallel query execution Higher query performance by splitting a single query for execution across different CPU cores.
pgvector extension Support for vector data types, enabling efficient storage and querying of high-dimensional vectors.
Connection Management Server side connection management enabling upto 30K connections per node

Refer to roadmap tracker for the list of all items in the current roadmap.

Recently released features

v2025.2 (Stable) - December 2025

v2025.2 is the current stable release. Stable releases undergo rigorous testing for a longer period of time and are ready for production use. For the full list of features and improvements in this release, see Release notes - v2025.2. Here are some of the prominent features.

PostgreSQL features enabled by default on new universes**

For new universes running v2025.2 or later, the following YSQL features are now enabled by default when you deploy using yugabyted, YugabyteDB Anywhere, or YugabyteDB Aeon (coming soon to the Early Access track):

In addition, if you upgrade to v2025.2 and the universe already has cost-based optimizer enabled, the following features are enabled by default:

Note that, apart from the exceptions noted, upgrading existing universes does not change the defaults for any of these features.

For more information on PostgreSQL features developed in YugabyteDB for enhanced compatibility, refer to Enhanced PostgreSQL Compatibility Mode.

Table-level locking for concurrent DDL and DML

Added Table-level locks to support concurrent DDL and DML operations across sessions, improving workload concurrency and reducing conflicts during schema changes.

Improved time synchronization across nodes

Time synchronization across nodes has been enhanced through the use of the ClockBound library, which is an open source daemon that allows you to compare timestamps to determine order for events and transactions, independent of an instance's geographic location; it improves clock accuracy by several orders of magnitude.

v2025.1 (Stable) - July 2025

For the full list of features and improvements in this release, see Release notes - v2025.1. Here are some of the prominent features.

PostgreSQL 15 compatible YugabyteDB clusters

This is the first stable release featuring a PostgreSQL fork rebase from version 11.2 to 15.0, enabling you to leverage the many key capabilities introduced in PostgreSQL between the two versions. This upgrade brings YSQL API support for numerous features, including stored generated columns, foreign keys on partitioned tables, and non-distinct NULLs in unique indexes. It also introduces query execution optimizations like incremental sort and memoization, along with various observability and security enhancements.

We're also pleased to announce that YugabyteDB 2025.1.0.0 supports in-place online upgrades and downgrade—even with the PostgreSQL fork rebased to 15.0.

Note that the source cluster must be running version 2024.2.3.0 or later to upgrade to version 2025.1.0.

HNSW indexing support for pgvector

Brings AI-native capability by enabling efficient similarity search in vector workloads. Enhanced vector search capabilities via Hierarchical Navigable Small World (HNSW) indexing provide faster and more efficient high-dimensional vector lookups.

Automatic transactional xCluster DDL replication

YugabyteDB now supports seamless replication of YSQL DDL changes across xCluster setups, eliminating the need to manually apply DDLs on both source and target clusters.

Parallel queries: Enabling PG parallelism for colocated tables

Improves query performance for colocated tables by allowing PostgreSQL to leverage multiple CPUs, leading to faster query execution times.

Optimization of INSERT ON CONFLICT batching

Queries using the INSERT ... ON CONFLICT clause are optimized for efficient execution, with automatic batching applied when multiple statements are executed to improve performance.

Cost-Based Optimizer (CBO)

The CBO leverages YugabyteDB's distributed storage architecture and advanced query execution optimizations, including query pushdowns, LSM indexes, and batched nested loop joins, to deliver PostgreSQL-like performance.

Bitmap scan support

Combine multiple indexes for more efficient scans.

v2.25 (Preview) - January 2025

v2.25 is the most recent Preview release. This includes features under active development and is recommended for development and testing only. For the full list of features and improvements in this release, see Release notes - v2.25. Here are some of the prominent features.

PostgreSQL 15 Support

As part of this release, we have upgraded our PostgreSQL fork from version 11.2 to 15.0, enabling you to leverage the many key capabilities introduced in PostgreSQL between these two versions. This upgrade brings YSQL API support for numerous features, including stored generated columns, foreign keys on partitioned tables, and non-distinct NULLs in unique indexes. It also introduces query execution optimizations like incremental sort and memoization, along with various observability and security enhancements.

Query Diagnostics

This feature significantly simplifies tuning poorly performing SQL queries by allowing you to capture and export detailed diagnostic information, including bind variables and constants, pg_stat_statements statistics, schema details, active session history, and execution plans.

Active session history

In addition, the Active Session History, which provides real-time and historical views of system activity, is now enabled by default.

Architecture

YugabyteDB Architecture

Review detailed architecture in our Docs.

Need Help?

Contribute

As an open-source project with a strong focus on the user community, we welcome contributions as GitHub pull requests. See our Contributor Guides to get going. Discussions and RFCs for features happen on the design discussions section of our Forum.

For AI agents, refer to AGENTS.md for guidance on working with this codebase.

License

This repository contains two differently licensed components. See LICENSE.md for detailed directory mappings.

By default, the build generates only the Apache 2.0 licensed database binaries.

Read More

yugabyte-db (yugabyte/yugabyte-db)

Searching Database…

这是什么?YugabyteDB 是一个开源的、兼容 PostgreSQL 的分布式 SQL 数据库。它把传统关系型数据库的事务正确性与 NoSQL 系统的水平扩展能力结合在一起,面向业务关键型的云原生 OLTP 应用。
它和直接运行 PostgreSQL 有什么不同?它复用了 PostgreSQL 的查询层(YSQL),所以数据类型、存储过程、触发器和扩展都能照常使用,但数据会通过 Raft 共识协议复制到整个集群,并支持 Spanner 风格的分布式 ACID 事务。
怎么把集群跑起来?可以使用 yugabyted、YugabyteDB Anywhere 或 YugabyteDB Aeon 来部署,然后按照快速入门(Quick Start)操作——它会建议你试试真实场景的演示应用,比如一个微服务电商应用。
我的应用可以用哪些语言和驱动?客户端驱动和 ORM 支持涵盖 Java、Go、NodeJS、Python 等。由于 YSQL 复用了 PostgreSQL 的查询层,现有的 PostgreSQL 驱动和工具通常都能直接沿用。
它和最新版 PostgreSQL 有多接近?YSQL 目前基于 PostgreSQL 15 的分支构建,在 v2025.1 中从 11.2 完成了 rebase,因此较新的 PostgreSQL 功能和扩展可能会落后于上游。预览版(Preview)包含仍在积极开发中的功能,仅用于开发和测试。
它能跨多个地区或多个云吗?可以——部署可以覆盖三个或更多故障域:多可用区、多机架、多地区和多云。xCluster 异步复制支持多主(multi-master)架构,只读副本(read replica)则以低延迟提供略滞后的数据。
这里的开源具体指什么?核心数据库在 Apache 2.0 协议下完全开源,开源版本甚至包含企业级功能,比如分布式备份、静态加密、TLS、变更数据捕获(CDC)和只读副本。独立的管理平台 YugabyteDB Anywhere 则采用 Polyform Free Trial 许可证;默认构建只会产出 Apache 许可的二进制文件。
如果某个节点、可用区或地区出故障会怎样?基于 Raft 的复制提供原生的故障转移和修复能力,集群可以配置为自动容忍磁盘、机架、节点、可用区、地区甚至整个云的故障。在典型的多可用区部署中,RPO 为 0(不丢数据),RTO 为 3 秒。
YSQL 和 YCQL 这两个 API 有什么区别?YSQL 是完全关系型的 API,复用了 PostgreSQL 的查询层。YCQL 是一种半关系型、类 SQL 的 API,支持文档和索引,其源头是 Apache Cassandra QL。
现在能直接用于生产环境吗?可以——v2025.2(2025 年 12 月)是当前的稳定版本,稳定版都会经过严格的长周期测试,可放心用于生产环境。像 v2.25 这样的预览版仅建议用于开发和测试。
可以用它做向量搜索这类 AI 工作负载吗?可以——v2025.1 为 pgvector 增加了 HNSW 索引支持,可以对高维向量做高效的相似度搜索,更全面的 pgvector 扩展支持也已列入路线图。
What are similar projects?cockroach, shardingsphere, rqlite, citus, etcd, nebula, oceanbase, tidb
Creator
yugabyte
Size
1.1 GB
Stars
10.6K
Age
9y
Commits · 90 Days