Tagged articles
3 articles
Page 1 of 1
ITPUB
ITPUB
Feb 24, 2026 · Databases

Why INSERT … SELECT Can Lock Your Table and How an Index Saves the Day

A real‑world MySQL incident shows that using INSERT … SELECT without proper indexing can cause full‑table scans and progressive row locks, leading to massive payment failures, but adding an index on the filter column prevents the lock and restores safe batch migration.

INSERT SELECTindexmysql
0 likes · 8 min read
Why INSERT … SELECT Can Lock Your Table and How an Index Saves the Day
Aikesheng Open Source Community
Aikesheng Open Source Community
Nov 26, 2025 · Databases

Why INSERT…SELECT Slows Down on OceanBase and How to Fix It

During an Oracle‑to‑OceanBase migration, a client encountered extremely slow INSERT…SELECT batch jobs due to a global unique non‑partitioned index, and the article walks through extracting logical and physical plans, pinpointing the bottleneck operators, and demonstrates converting the index to a partitioned one to cut execution time from over 30 minutes to 14 minutes.

INSERT SELECTIndex TuningOceanBase
0 likes · 16 min read
Why INSERT…SELECT Slows Down on OceanBase and How to Fix It
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 8, 2021 · Databases

Understanding Table Locks in MySQL When Using INSERT INTO SELECT and the Impact of Isolation Levels

The article explains why an INSERT INTO SELECT statement can lock an entire InnoDB table in MySQL, demonstrates the lock behavior with transaction examples, and offers two solutions—adding an index on the filtered column and adjusting the transaction isolation level—to avoid table‑wide blocking.

INSERT SELECTInnoDBindex
0 likes · 13 min read
Understanding Table Locks in MySQL When Using INSERT INTO SELECT and the Impact of Isolation Levels