Tagged articles
10 articles
Page 1 of 1
Java Tech Enthusiast
Java Tech Enthusiast
Oct 3, 2024 · Databases

MySQL Large Table Data Deletion Optimization Strategy

To efficiently purge old user‑operation logs while retaining the most recent three months and preserving type‑c entries, the article recommends abandoning offset pagination and MyBatis PageHelper, using primary‑key‑based pagination with a tracked startId, in‑memory filtering, intelligent startId recalculation, and optional sleep intervals to avoid database overload.

Database Optimizationdata cleanuplarge table deletion
0 likes · 6 min read
MySQL Large Table Data Deletion Optimization Strategy
dbaplus Community
dbaplus Community
Apr 18, 2024 · Databases

How I Rescued a MySQL Table After a Massive Bad‑Group Insertion

A Java developer recounts a production MySQL outage caused by a faulty batch insert, walks through failed delete and lock‑free attempts, then details a series of table‑recreation, truncate, and index‑rebuilding steps that finally restored data integrity and performance.

DDLDatabase AdministrationIndex Recovery
0 likes · 13 min read
How I Rescued a MySQL Table After a Massive Bad‑Group Insertion
Alibaba Cloud Developer
Alibaba Cloud Developer
Apr 8, 2024 · Databases

How I Rescued a MySQL Table After Massive Bad Data Insertion

When a user reported errors, I discovered a MySQL table flooded with millions of bad rows from a new group, causing slow queries and crashes; I detail the step‑by‑step investigation, failed attempts with DELETE and lock‑free changes, and the final successful rebuild using temporary tables, DROP, TRUNCATE, and index reconstruction.

DDLdata cleanupdatabase
0 likes · 13 min read
How I Rescued a MySQL Table After Massive Bad Data Insertion
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 28, 2021 · Databases

Using pt-archiver for Batch Deletion of Large MySQL Tables

The article explains why massive MySQL tables need periodic cleanup, compares risky drop/truncate approaches, and provides a step‑by‑step guide to safely delete historical data in batches using pt‑archiver with proper parameters, session handling, and post‑deletion maintenance.

Batch Deletiondata cleanupmysql
0 likes · 7 min read
Using pt-archiver for Batch Deletion of Large MySQL Tables
ITPUB
ITPUB
Dec 5, 2017 · Databases

How to Remove Duplicate MySQL Records with a Single Fast SQL Query

This article walks through the problem of duplicate rows in a MySQL table, shows an initial complex SQL attempt, compares a slow PHP‑based cleanup, and finally presents a concise, three‑step DELETE statement that eliminates duplicates in under a second.

data cleanupduplicate recordsmysql
0 likes · 6 min read
How to Remove Duplicate MySQL Records with a Single Fast SQL Query