To answer this question, we need to understand the concept of DDL operations.
In addition to DML statements that directly manipulate data (such as SELECT, INSERT, UPDATE, DELETE, etc.), database operation and maintenance also involves other statements, such as CREATE, ALTER, DROP, TRUNCATE, etc. Related to data definition. The latter type of statement is called a DDL statement. For example, adding a column to a table and adding an index to a column are two everyday DDL operations.
In the early days of database development, the execution of DDL statements was considered one of the most expensive database operations because DDL operations would render tables unreadable and block tasks that were in progress at the time. Executing DDL statements on a table with a large amount of data will cause the database service to be blocked for a long time, which is unacceptable for critical businesses that need to be online all the time. Therefore, Online DDL was introduced to keep user requests alive while executing DDL statements. So far, most Online DDL-based databases on the market do not make DDL operations completely transparent to users.
Most standalone databases apply transient locks during Online DDL operations. For example, DDL operations in large transactions in MySQL databases may block user requests.
Due to the limitation of distributed architecture, online DDL operations in many distributed databases will also interfere with user requests in certain business scenarios.
Online DDL is specially developed for independent databases, focusing on solving the impact of DDL operations on normal user requests. It does not take into account the response of node anomalies (such as server crashes) in the distributed database.
In this era of data explosion, the execution time of DDL statements is also the limiting factor to speed up business upgrades. In a standalone database, parallel sorting is often used to maximize the execution speed of DDL statements. However, the speed is limited by the performance bottleneck of the independent architecture. In distributed databases, the common practice in the industry is to complete data by simulating insert operations, which cannot fully utilize the performance of each server and ignores the benefits of scalability.
It can be said that the original Online DDL function alone cannot meet today's business needs.
We believe that modern DDL features should provide at least the following two benefits to better meet users' business needs.
First of all, the execution of DDL statements will not affect the DML or DQL operations on the business side, even if there are exceptions such as server crashes in the distributed system, they can still succeed.
Secondly, oltp database statements can be executed in parallel in independent systems and distributed systems, helping users to quickly carry out business innovation.