Tag

DDL

1 views collected around this technical thread.

Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 11, 2025 · Databases

Why Does Adding a Column Trigger Duplicate Entry Errors in MySQL?

An experienced DBA explains why adding a new column in MySQL can unexpectedly raise duplicate entry errors during online DDL, detailing the role of primary and unique keys, the innodb_online_alter_log_max_size setting, and how concurrent DML operations cause the conflict.

DDLMySQLdatabase
0 likes · 8 min read
Why Does Adding a Column Trigger Duplicate Entry Errors in MySQL?
Selected Java Interview Questions
Selected Java Interview Questions
Oct 25, 2024 · Databases

Understanding Foreign Keys: Syntax, Operations, Advantages, Disadvantages, and Usage Scenarios

This article explains foreign key concepts in relational databases, showing how to create, modify, and drop foreign key constraints with SQL code, provides hands‑on exercises, discusses the pros and cons of using foreign keys, and outlines when they are appropriate or should be avoided.

DDLDMLData Integrity
0 likes · 6 min read
Understanding Foreign Keys: Syntax, Operations, Advantages, Disadvantages, and Usage Scenarios
vivo Internet Technology
vivo Internet Technology
Aug 7, 2024 · Databases

MySQL 5.7 DDL vs GH-OST: A Comprehensive Comparison of Online Schema Change Tools

While MySQL 5.7 native DDL methods (copy, inplace rebuild, index build, metadata‑only) vary in speed, space use, lock impact, and binlog output, GH‑OST consistently offers the fastest execution, lowest lock blocking, real‑time replication, albeit at roughly double storage cost, making it ideal for risk‑averse online schema changes.

DDLInnoDBMySQL
0 likes · 11 min read
MySQL 5.7 DDL vs GH-OST: A Comprehensive Comparison of Online Schema Change Tools
Selected Java Interview Questions
Selected Java Interview Questions
Jun 13, 2024 · Databases

Understanding InnoDB Locks and Whether Adding a Column Locks the Table in MySQL

This article explains InnoDB lock concepts, differentiates read and write locks, discusses table‑level versus row‑level locking, and examines how MySQL 5.6 and 8.0 handle adding columns without fully locking tables, highlighting online DDL, atomic DDL, and performance considerations.

DDLInnoDBLocks
0 likes · 8 min read
Understanding InnoDB Locks and Whether Adding a Column Locks the Table in MySQL
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 4, 2024 · Databases

Deep Dive into pt-osc: Working Principles, Common Pitfalls, and Practical Recommendations

This article thoroughly explains how the Percona pt-osc tool performs online schema changes in MySQL, analyzes trigger design, deadlock scenarios, data‑consistency issues, and provides detailed test cases, operational tips, and best‑practice recommendations for safe usage.

DDLDeadlockMySQL
0 likes · 26 min read
Deep Dive into pt-osc: Working Principles, Common Pitfalls, and Practical Recommendations
Wukong Talks Architecture
Wukong Talks Architecture
Dec 24, 2023 · Databases

MySQL Indexes, Lock Types, Transaction Isolation Levels, and Deadlock Analysis

This article explains MySQL index structures, covers covered and back‑table queries, details InnoDB transaction isolation levels, classifies various lock types (table, row, gap, next‑key, intention, auto‑inc, metadata), analyzes lock behavior in multiple scenarios, discusses deadlock causes, and provides DDL and online schema‑change recommendations.

DDLDeadlockMySQL
0 likes · 61 min read
MySQL Indexes, Lock Types, Transaction Isolation Levels, and Deadlock Analysis
Code Ape Tech Column
Code Ape Tech Column
Jun 12, 2023 · Databases

Understanding MySQL DDL Execution and Online DDL Mechanisms

This article explains the differences between MySQL DDL and DML, describes how online DDL works—including copy and inplace algorithms, execution phases, common pitfalls, limitations, and recent MySQL 8.0 enhancements—providing practical guidance for safely altering large tables.

DDLInnoDBMySQL
0 likes · 16 min read
Understanding MySQL DDL Execution and Online DDL Mechanisms
Aikesheng Open Source Community
Aikesheng Open Source Community
May 17, 2023 · Databases

Diagnosing and Resolving DDL Blocking in MySQL Using sys.schema_table_lock_waits

This article explains how to identify when a MySQL DDL operation is blocked, locate the blocking session using the sys.schema_table_lock_waits view, and resolve the issue by enabling necessary instruments and killing the appropriate connection, with examples for MySQL 5.7 and 8.0.

DDLMySQLPerformance Schema
0 likes · 10 min read
Diagnosing and Resolving DDL Blocking in MySQL Using sys.schema_table_lock_waits
Tencent Database Technology
Tencent Database Technology
Mar 30, 2023 · Databases

TXSQL Parallel DDL: Design, Implementation, and Performance

This article explains the challenges of slow DDL operations in MySQL, introduces TXSQL’s Parallel DDL framework—including Copy, Inplace, and Instant algorithms—details their design, implementation, code examples, and performance evaluations, and compares them with other database solutions.

DDLDatabase OptimizationMySQL
0 likes · 22 min read
TXSQL Parallel DDL: Design, Implementation, and Performance
Selected Java Interview Questions
Selected Java Interview Questions
Nov 12, 2022 · Databases

MySQL Large‑Table Index Optimization and Maintenance Strategies

This article analyzes performance problems of a massive MySQL table, demonstrates how to use pt‑query‑digest and EXPLAIN to identify inefficient composite indexes, proposes index redesign, compares online DDL with pt‑osc for index rebuilding, and presents batch‑delete techniques to reduce SLA‑impacting latency.

Batch DeleteDDLIndex Optimization
0 likes · 14 min read
MySQL Large‑Table Index Optimization and Maintenance Strategies
Top Architect
Top Architect
Sep 28, 2022 · Databases

Optimizing Large MySQL Tables: Slow‑Query Analysis, Index Tuning, and Efficient Deletion

This article details a comprehensive performance investigation of a massive MySQL table, using pt‑query‑digest to analyze slow queries, exposing index inefficiencies, proposing index redesign, demonstrating backup/restore with mydumper, comparing online DDL and pt‑osc for index rebuilding, and recommending small‑batch deletions to reduce latency and maintenance overhead.

DDLIndex OptimizationMySQL
0 likes · 15 min read
Optimizing Large MySQL Tables: Slow‑Query Analysis, Index Tuning, and Efficient Deletion
Wukong Talks Architecture
Wukong Talks Architecture
Sep 27, 2022 · Databases

MySQL Large Table Index Optimization and Delete Performance Tuning

This article analyzes a MySQL large‑table performance issue caused by slow queries and full‑table scans, demonstrates using pt‑query‑digest, explains execution plans, proposes index redesign, shows backup and restore with mydumper, compares online DDL and pt‑osc, and presents batch delete strategies to reduce latency.

Batch DeleteDDLIndex Optimization
0 likes · 13 min read
MySQL Large Table Index Optimization and Delete Performance Tuning
Top Architect
Top Architect
Sep 17, 2022 · Databases

Optimizing Large MySQL Tables: Index Tuning, Slow Query Analysis, and Efficient Deletion Strategies

This article details a comprehensive analysis of a large MySQL table's performance issues, including slow query diagnostics with pt‑query‑digest, index evaluation, backup and restore procedures, online DDL versus pt‑osc, and practical strategies for index redesign and batch deletions to reduce latency and maintenance overhead.

DDLDatabase MaintenanceIndex Optimization
0 likes · 14 min read
Optimizing Large MySQL Tables: Index Tuning, Slow Query Analysis, and Efficient Deletion Strategies
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 13, 2022 · Databases

Bypassing GTID Restrictions on CREATE TABLE … SELECT and Temporary Tables in MySQL 5.6/5.7 and Their Removal in MySQL 8.0

The article explains the strict GTID‑based replication limits on CREATE TABLE … SELECT and temporary‑table statements in MySQL 5.6/5.7, demonstrates practical work‑arounds such as splitting statements or using CREATE TABLE LIKE, and shows how MySQL 8.0’s native DDL atomicity eliminates these constraints.

DDLGTIDMySQL
0 likes · 12 min read
Bypassing GTID Restrictions on CREATE TABLE … SELECT and Temporary Tables in MySQL 5.6/5.7 and Their Removal in MySQL 8.0
Qunar Tech Salon
Qunar Tech Salon
May 31, 2022 · Databases

Comparison of pt-online-schema-change, gh-ost, and MySQL Online DDL for Online Schema Changes

This article introduces and compares three MySQL online schema‑change solutions—pt‑online‑schema‑change, gh‑ost, and native MySQL ONLINE DDL—detailing their workflows, limitations, risks, monitoring features, and practical considerations for safely altering large tables in production environments.

DDLMySQLOnline Schema Change
0 likes · 27 min read
Comparison of pt-online-schema-change, gh-ost, and MySQL Online DDL for Online Schema Changes
Aikesheng Open Source Community
Aikesheng Open Source Community
May 26, 2022 · Databases

Resolving Xtrabackup Backup Failures Caused by Non‑Redo Logging DDL Operations in MySQL 5.7

This article analyses why physical backups using Xtrabackup fail when MySQL 5.7 performs online DDL operations that skip redo logging, demonstrates the issue with real‑world logs, and presents four practical solutions—including lock‑DDL parameters, per‑table MDL locks, and disabling online DDL—to ensure consistent backups.

DDLMySQLSorted Index Build
0 likes · 23 min read
Resolving Xtrabackup Backup Failures Caused by Non‑Redo Logging DDL Operations in MySQL 5.7
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 26, 2022 · Databases

Understanding MySQL Metadata Locks (MDL) and Their Impact on DDL/DML Operations

The article explains MySQL's metadata lock (MDL) mechanism, shows how to enable its instrumentation, demonstrates various lock scenarios with SELECT, INSERT and ALTER statements, and provides guidance on diagnosing and resolving MDL‑related blocking issues.

DDLDMLMDL
0 likes · 12 min read
Understanding MySQL Metadata Locks (MDL) and Their Impact on DDL/DML Operations
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 18, 2022 · Databases

Evaluation of SQLE SQL Auditing Tool's Support for MySQL 8.0

This article evaluates the open‑source SQLE SQL auditing platform against MySQL 8.0.28, demonstrating how DDL, DML, DCL statements and their contextual relationships are checked, highlighting successful detections, mismatches caused by new MySQL 8.0 features, and concluding on overall compatibility.

DCLDDLDML
0 likes · 7 min read
Evaluation of SQLE SQL Auditing Tool's Support for MySQL 8.0
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 12, 2022 · Databases

Using pt-osc for Table DDL Changes with DTLE: Procedure and Support

This article explains how DTLE supports pt-osc table schema changes by describing pt-osc's underlying mechanism, DTLE's DDL capabilities, and step‑by‑step instructions for deploying DTLE, preparing MySQL data, configuring a DTLE job, running pt‑online‑schema‑change, and verifying successful synchronization.

DDLDTLEMySQL
0 likes · 7 min read
Using pt-osc for Table DDL Changes with DTLE: Procedure and Support