TiDB 8.5.0 LTS is here, and it’s a game-changer! Packed with groundbreaking features, this release supercharges performance, scalability, and security, making it the perfect upgrade for high-demand workloads. Whether you're managing massive databases, fine-tuning query speeds, or fortifying data security, TiDB 8.5.0 delivers innovations that redefine efficiency.
From blazing-fast table creation to an advanced MVCC In-Memory Engine, parallel TSO optimizations, and enhanced TiProxy capabilities, this release is built to handle the challenges of modern databases. And with official foreign key support, vector search, and client-side encryption for backups, TiDB 8.5.0 is pushing the boundaries of what is possible. Let’s dive into some of the major updates and features that come with TiDB 8.5.0!
Performance Enhancements
Accelerated table creation with tidb_enable_fast_create_table
TiDB 8.5.0 introduces the tidb_enable_fast_create_table setting, which speeds up table creation, making it more efficient for large-scale migrations and new instance setups. This feature reduces the time required to create millions of tables, improving performance and scalability.
TiKV MVCC In-Memory Engine for faster queries
TiDB 8.5.0 improves query performance with the TiKV MVCC In-Memory Engine, which caches the latest data versions in memory while skipping older ones. This reduces scan time, making queries faster and improving overall responsiveness, especially for workloads with frequent updates or large historical data.
Active PD Follower for better load handling
This feature enhances scalability for the PD (Placement Driver) service. PD followers now handle Region requests, reducing the load on the PD leader and ensuring smooth performance even in large clusters with high request volumes.
Parallel Mode for TSO Requests: Modes, benefits, and monitoring
TiDB 8.5.0 continues to optimize performance by enhancing support for parallel modes in TSO RPC requests. The new tidb_tso_client_rpc_mode system variable allows you to switch between DEFAULT, PARALLEL, and PARALLEL-FAST modes, reducing the time spent waiting for TS retrieval in certain scenarios.
- DEFAULT: Serial processing of TSO RPC requests with batching.
- PARALLEL: Reduces batch collection duration and uses two concurrent TSO RPC requests, cutting wait time by up to 17% compared to DEFAULT mode.
- PARALLEL-FAST: Further reduces batch collection duration and uses four concurrent TSO RPC requests, cutting wait time by up to 25% compared to DEFAULT mode.
For optimal results, ensure your system meets the following conditions:
- TSO waiting time significantly impacts query execution.
- PD and TiDB nodes have sufficient CPU resources.
- Network latency between TiDB and PD is higher than PD's TSO allocation time.
Refer to the PD TSO RPC Duration panel in Grafana for monitoring and adjustment. Note that PARALLEL and PARALLEL-FAST are incompatible with tidb_tso_client_batch_max_wait_time and tidb_enable_tso_follower_proxy.
Instance-Level Plan Cache for improved OLTP performance
Introduced in TiDB v8.4.0, the instance-level execution plan cache enables all sessions within the same TiDB instance to share cached execution plans. This reduces SQL compilation time, leading to faster query execution, improved OLTP performance, higher throughput, and better memory management. This feature enhances database stability and efficiency, especially for high-demand workloads.
Efficiency in Operations
Resource optimization for DELETE operations
Introduced in v8.4.0 and improved further, TiDB now minimizes the resource overhead caused by DELETE operations. By optimizing internal memory and I/O usage, large-scale deletions are more efficient, ensuring stable performance under heavy delete workloads.
Request rate limiting for PD to prevent overload
As traffic grows, ensuring stability becomes crucial. With TiDB 8.5.0, you can now limit the maximum rate and concurrency of requests to PD, mitigating the risk of system overload. This is a major enhancement for clusters handling high throughput.
Runaway query controls to manage resource-heavy queries
TiDB now offers better control to identify and limit resource-hogging queries. By tracking processed keys and request units (RU), you can proactively handle performance bottlenecks, keeping your cluster running smoothly.
New SQL Features
Foreign Key Support
In version 8.5.0, foreign key constraints are officially supported. This feature ensures data consistency between parent and child tables and supports cascading operations for updates and deletions, simplifying relational data management.
Online DDL Job Modification
TiDB 8.5.0 lets you modify DDL jobs online with the new ADMIN ALTER DDL JOBS statement. Now, you can adjust parameters like batch size and write speed without causing downtime or disrupting the cluster.
Experimental Vector Search
For those diving into AI or recommendation systems, TiDB 8.5.0 introduces experimental support for Vector Search. This feature brings semantic search capabilities, which are key for use cases like AI-driven recommendations and Retrieval-Augmented Generation (RAG).
TiProxy Enhancements
TiProxy, TiDB’s lightweight SQL and connection proxy, now includes improved connection pooling and enhanced routing logic. These upgrades help reduce latency, balance traffic more efficiently across backend nodes, and improve overall cluster performance and reliability.
Expanding TiProxy Use Cases for Enhanced TiDB High Availability
TiProxy plays a pivotal role in ensuring the high availability of TiDB. With continuous advancements, its capabilities now extend beyond traditional SQL traffic access and forwarding, addressing more sophisticated needs like cluster change evaluation.
Here are the key features driving TiProxy's expanded use cases:
- Traffic Capture and Replay (Experimental, introduced in v8.4.0):
TiProxy can capture and replay SQL traffic, enabling debugging, performance analysis, and reproducing issues for enhanced troubleshooting and optimization. - Built-in Virtual IP (VIP) Management (Introduced in v8.3.0):
Simplifying network configurations, TiProxy now supports integrated VIP management, making failover processes smoother and more efficient. - Multiple Load Balancing Policies (Introduced in v8.2.0):
TiProxy offers flexible load balancing strategies, ensuring optimal traffic distribution and improved workload handling across TiDB nodes.
These enhancements position TiProxy as a versatile and powerful tool for managing TiDB clusters, ensuring stability, scalability, and seamless operations even in dynamic environments.
Backup & Security
Client-Side Encryption for Backups (General Availability)
TiDB 8.5.0 introduces client-side encryption for backups, so you can encrypt your backup data before it even leaves your server. Whether using a fixed key or a Key Management Service (KMS), this ensures that your backup data is secure during transmission and at rest.
TiKV Encryption with Google Cloud KMS
If you're on Google Cloud, TiKV now supports encryption at rest with Google Cloud KMS. This allows you to manage encryption keys in a more flexible and secure way, giving you peace of mind for your sensitive data.
Compatibility and Deprecations: What’s Changing
Deprecations
- Integer Display Width: The integer display width feature for TiDB is deprecated.
- TiDB Binlog: Future versions will remove support for TiDB Binlog. Migrate to TiCDC for data replication and PITR for point-in-time recovery.
Improvements & Bug fixes
• 85 Major bugs fixed and 20+ major improvements at TiDB, TiKV, PD & Tools
TiDB 8.5.0 is a powerful release packed with features tailored to make your database more performant, reliable, and secure. Whether you’re handling large-scale migrations, optimizing query performance, or securing your backups, TiDB 8.5.0 has got you covered. If you're ready to unlock these improvements, upgrading to TiDB 8.5.0 will help you stay ahead in the ever-evolving world of modern databases. Keep an eye out for more enhancements in future releases, and enjoy the new capabilities that come with this exciting update.
Looking to improve your TiDB setup or need help with the latest features? Mydbops offers expert TiDB consulting services to assist with everything from performance optimization to seamless migrations. Our team is here to ensure your TiDB environment runs smoothly, efficiently, and securely. Get in touch with us to enhance your TiDB deployment today.