pingcap / tidb

TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://www.pingcap.com/tidb-serverless/

Home Page:https://pingcap.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

optimize execution of general DDL

D3Hunter opened this issue · comments

Enhancement

we have optimize create table using fast-create, but there are scenarios that we might create a lot of database, or run many DDLs like add/modify column in the maintenance window.
so we want to optimize execution of general DDL, and in a unified way

  • #53217
  • add index on type for tidb_ddl_job to make some query faster
  • run lifecycle of a job in the worker, so we don't need to query them multiple times
  • move job dependency calculation into memory, to avoid the slower SQL
  • run general DDLs with multiple workers
  • notify the session which is not on DDL owner node when owner finished handling by RPC or other way