Quick Review of TiDB PPT Player V6.5 New Features

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TiDB PPT玩家快速点评 V6.5 新特性

| username: Billmay表妹

There may be some new features that I didn’t comment on because I only comment on what I understand. The author is someone who likes TiDB and researches TiDB. Since TiDB is not used in production, he calls himself a PPT player.

The entire text is a review of the new features in this article 《TiDB 6.5 LTS Release

1. Cluster Flashback

Previously, TiDB already supported table-level flashback, and this time it supports cluster-level flashback, which completes the flashback feature. MySQL natively does not support flashback, and I don’t know why they don’t develop this feature; it’s very useful.

2. Automatic Splitting of Large Transactions

This means you no longer need to write a for loop + delete xxx where xxx limit xxx in your program to delete data. A new BATCH ON syntax has been added, which handles it directly at the database level. It’s a convenience feature, but it introduces a new syntax, batch on, that doesn’t exist in MySQL. However, this feature is not recommended for direct use in production environments as it is non-transactional. The suggested use is in change windows, test environments, or where the program has remedial measures.

3. High-Performance Global Monotonically Increasing auto_increment

MySQL itself is monotonically increasing, but since TiDB is distributed, it was difficult to achieve. Now it can finally achieve global monotonic increase.

4. TTL

A periodic data deletion feature that replaces partition tables. I’ve heard that TTL is a very mature feature in Redis, but I haven’t studied it.

5. Enhanced DDL

Previously, adding indexes in DDL was very slow, especially since the data volume stored in TiDB is usually much larger than in MySQL, making adding indexes slow and problematic. They add indexes in a queue, and different tables cannot add indexes simultaneously. If the index on my first table takes a day to add, I can’t add an index to the second table until it’s done. This pain point doesn’t exist in MySQL or any relational database; table DDLs are independent and non-blocking. Now TiDB’s DDL supports parallelism and introduces a new design, improving performance by 10 times. It supports multiple tables performing DDL simultaneously in different queues, so adding indexes no longer requires waiting in line.

6. Enhanced JSON Support

Copied from MySQL 5.7. I remember we wanted to save storage space back then, and we chose TiDB over MySQL’s tokudb storage engine. One reason was its support for JSON. Another reason was that xtrabackup didn’t support tokudb at the time (later I heard it did, with GitHub - xelabs/tokudb-xtrabackup: Hot backup tool for InnoDB&TokuDB databases based on Percona Xtrabackup 2.4, a branch of xtrabackup). Of course, tokudb is now obsolete, and a better choice is rockdb (Percona’s new favorite).

7. Global Memory Control

A major pain point of TiDB was frequent OOM (Out of Memory) issues. Global memory control can prevent OOM. If memory is insufficient after setting, it will report an error, saying that the SQL uses too much memory and won’t execute.

8. Diversified Disaster Recovery Capabilities

The new PITR in version 6.5 stands for Point-in-Time Recovery. The title is accurate; it diversifies disaster recovery capabilities rather than enhancing them. Because this doesn’t really count as disaster recovery, broadly speaking, it barely qualifies as a lower-level disaster recovery—disaster backup. Both RTO and RPO are very low. It indeed diversifies disaster recovery capabilities, suitable for low-cost disaster recovery solutions. TICDC has always been very good and powerful, a relatively expensive disaster recovery solution. DM is a highly praised tool for disaster recovery, enhanced migration, heterogeneous synchronization, and MySQL to MySQL. It can filter DML, for example, if you only want to replay insert and update but not delete. A few days ago, someone in the group asked about it, and I recommended DM.

Author: fander
Source: https://mp.weixin.qq.com/s/0aZG8y6zvqqrPoJDC1AzHg

| username: Lucien-卢西恩 | Original post link

Concise summary :+1:

| username: xingzhenxiang | Original post link

I have a deep impression of adding indexes in version 3.1.0, it takes a long time every time.