Tagged articles
schema migration
18 articles · Page 1 of 1
Adding a column to a MySQL table with tens of millions of rows can lock the table for minutes or even hours, disrupting services, so this article evaluates six practical approaches—including native online DDL, offline maintenance, PT‑OSC, logical migration with dual‑write, gh‑ost, and partition sliding‑window—detailing their mechanisms, trade‑offs, and suitable scenarios.
Large TablesMySQLdatabase operations
0 likes · 13 min read

The article provides a source‑code level analysis of Milvus Vector Transport Service (VTS), detailing its three‑stage architecture, partition‑aware sharding logic, two distinct sink write mechanisms (BufferBatchWriter and BulkWriter), schema conversion rules, error‑handling strategies, performance tuning parameters, and practical configuration examples for efficient vector data migration across various data sources.
BufferBatchWriterBulkWriterMilvus
0 likes · 20 min read

A mis‑designed phone number column can silently degrade index performance, overload CPU, and cause a cascade of timeouts in a 2‑billion‑user system, but by treating the phone as a domain value object, using a normalized VARCHAR, aligning indexing rules, and applying consistent sharding and migration strategies, you can prevent the database from collapsing under high concurrency.
Database DesignMySQLSharding
0 likes · 31 min read

This article presents a production‑grade solution for adding a new promotion_type column to a tens‑of‑millions‑row order table, covering MySQL DDL risks, multiple migration strategies, a step‑by‑step implementation using a new table, CDC‑based incremental sync, back‑fill, verification, gray rollout, and rollback procedures.
CDCGray DeploymentMySQL
0 likes · 38 min read

When a tens‑million‑row order table needs a new business column, directly running ALTER TABLE can lock the table and disrupt services, so the article explores master‑slave promotion, online DDL tools, schema‑less JSON extensions, and a clever use of an existing redundant column to achieve the change safely.
DDLJSONLarge Tables
0 likes · 7 min read


ITPUBJan 11, 2026 · Databases
This article examines why adding a column to a MySQL table with tens of millions of rows can lock the table, then presents six practical solutions—including native online DDL, PT‑OSC, gh‑ost, dual‑write migration, maintenance downtime, and partition sliding‑window—detailing their procedures, trade‑offs, and suitable scenarios.
Large TablesMySQLdatabase operations
0 likes · 12 min read

When a core order table with tens of millions of rows needs a new column, naïve ALTER TABLE can lock the table and disrupt services, so this article explores safe alternatives such as master‑slave switching, online DDL tools, extension tables, JSON‑based schema‑less designs, and clever reuse of existing redundant fields, complete with practical code snippets and lessons learned.
DDLJSONMySQL
0 likes · 9 min read

When adding a column to a MySQL table with tens of millions of rows, lock contention can cripple services, so this guide compares six practical solutions—including native online DDL, PT‑OSC, gh‑ost, partition sliding windows, downtime maintenance, and dual‑write migration—detailing their mechanisms, trade‑offs, use‑cases, and step‑by‑step commands to ensure minimal disruption.
Large TablesMySQLdatabase operations
0 likes · 12 min read

When a core order table with tens of millions of rows needs a new business field, directly running ALTER TABLE can lock the table and disrupt services, so this article explores master‑slave switching, online DDL tools, extension tables, JSON fields, and clever reuse of existing redundant columns to achieve the change safely and efficiently.
JSON fieldLarge TablesMySQL
0 likes · 9 min read

This article explores why adding columns to massive MySQL tables can lock the database, explains the risks, and presents six practical solutions—including native online DDL, downtime maintenance, PT‑OSC, logical migration with dual writes, gh‑ost, and partition sliding windows—along with best‑practice tips for monitoring, backup, and performance.
Large TablesMySQLgh-ost
0 likes · 11 min read

The article details a MySQL 5.7 bug where rollback SQL generated for a JSON NOT NULL column produces an empty string instead of NULL, explains the underlying binlog behavior, reproduces the issue with sample tables, and provides a practical workaround by converting the JSON column to TEXT before re‑importing the data, while recommending strict SQL_MODE for production.
JSONMySQLdatabase troubleshooting
0 likes · 7 min read

Database schema changes are among the riskiest development tasks, and this article reviews top migration tools—from basic CLI clients like mysql and psql, through popular GUIs such as phpMyAdmin and DBeaver, to modern GitOps/Database-as-Code solutions like Liquibase, Flyway, Sqitch, Atlas, Prisma, and Bytebase—highlighting their features, pricing, and collaboration capabilities.
DevOpsGUIGitOps
0 likes · 9 min read

This guide walks through creating a multi‑tenant ad‑analytics SaaS using Citus, covering schema design, sharding by company_id, data ingestion, reference tables, online schema changes, tenant‑specific JSONB fields, hardware scaling, large‑tenant isolation, and migration steps with concrete SQL examples and commands.
CitusJSONBPostgreSQL
0 likes · 27 min read

This article explains practical strategies for adding a new column to a MySQL table with tens of millions of rows, including creating a temporary table, copying data, renaming tables, and alternative replica‑based or third‑party methods to avoid long locks and potential crashes.
Large TableMySQLadd column
0 likes · 4 min read

This article details the design, evolution, and operational practices of Ctrip's MySQL database release system, covering its three major versions, the adoption of gh‑ost, safety mechanisms, real‑world case studies, and performance improvements that enable reliable, low‑impact schema changes at scale.
MySQLautomationdatabase release
0 likes · 14 min read

A GitHub engineer argues that database foreign keys should be avoided because they shift integrity responsibilities to the DB, incur performance overhead, and cause complications during online schema migrations, illustrating the points with parent‑child tables, gh‑ost, and pt‑online‑schema‑change tools.
Foreign Keysdatabasesgh-ost
0 likes · 4 min read

This article explains the internal workflow of the gh‑ost online DDL tool, covering its execution steps, binlog handling, data consistency analysis, cut‑over process, lock management, and failure scenarios, with detailed code examples and practical insights for safe schema changes in MySQL.
MySQLcut-overgh-ost
0 likes · 15 min read

The article explains how distributed databases can perform online, asynchronous schema changes without blocking reads or writes by using lease‑based coordination, intermediate delete‑only and write‑only states, and a multi‑step algorithm inspired by Google F1 and implemented in CB‑SQL.
CB-SQLGoogle F1Online Schema Change
0 likes · 11 min read
