Tagged articles
TRUNCATE
27 articles · Page 1 of 1
The article explains MySQL's storage architecture, compares DELETE, TRUNCATE and DROP for removing data, shows how DELETE leaves hidden rows and generates logs that waste space, and advises using TRUNCATE, DROP or OPTIMIZE TABLE to reclaim disk space and avoid irreversible mistakes.
DELETEDROPData Storage
0 likes · 8 min read


ITPUBMar 5, 2026 · Databases
This article explains what the Oracle TRUNCATE command does, why recovery is challenging, and provides detailed step‑by‑step instructions for four practical tools—FY_Recover_Data, ODU, BBED, and GDUL—to restore data from a mistakenly truncated table.
OracleSQLTRUNCATE
0 likes · 5 min read

This article explains why deleting huge log files can crash a server, compares the low‑IO echo and truncate commands for safely emptying logs, provides practical examples, parameter tips, additional methods, and best‑practice recommendations for production environments.
ECHOIO optimizationLinux
0 likes · 10 min read

This article explains the fundamental differences between DELETE, TRUNCATE, and DROP, covering interview expectations, underlying mechanisms, performance impacts, transaction safety, best‑practice usage scenarios, and common pitfalls to help candidates choose the right command for any database task.
DELETEDROPInterview
0 likes · 9 min read

A senior cloud operations engineer receives a P1 alert for a web‑gateway server nearing 100% /var disk usage, then systematically logs in, diagnoses the log‑file bloat with df, du, and tail, truncates the offending debug log, and implements post‑mortem fixes to prevent recurrence.
Cloud OperationsLinuxP1 incident
0 likes · 10 min read

The article explains why using DELETE to remove rows in MySQL is discouraged, covering storage architecture, engine behavior, transaction handling, space reclamation, and compares DELETE with TRUNCATE and DROP in terms of speed, safety, and side effects.
DELETEDROPMySQL
0 likes · 10 min read

This article explains MySQL's storage architecture, why using DELETE to remove rows is discouraged, compares DELETE, DROP, and TRUNCATE in terms of speed, space reclamation, transaction behavior, and auto‑increment handling, and provides practical commands and optimization tips.
DELETEDROPData Storage
0 likes · 9 min read

This article explains MySQL's storage architecture, compares the DELETE, TRUNCATE, and DROP commands, shows their performance and side‑effects, and provides practical guidance on choosing the safest and most efficient way to remove data from a MySQL table.
DELETEDROPDatabase Storage
0 likes · 9 min read

When an Oracle table is accidentally truncated, this guide explains what TRUNCATE does, why recovery is difficult, and walks through four practical tools—Fy_Recover_Data, ODU, BBED, and GDUL—detailing step‑by‑step commands to restore the lost data safely.
Database ToolsOraclePLSQL
0 likes · 5 min read

This article reviews the long‑standing performance problems of TRUNCATE and DROP TABLE in MySQL, tracing their origins through official manuals and historical bugs, summarizing the optimizations introduced in MySQL 5.5.23, 5.7, 8.0, and 8.4, and offering practical guidance for mitigating remaining latency.
Adaptive Hash IndexDROP TABLEInnoDB
0 likes · 12 min read

This article explains how to locate duplicate rows in a table, contrasts TRUNCATE and DELETE commands, clarifies the difference between primary and candidate keys, demonstrates queries for retrieving the second highest salary, and provides a collection of typical SQL interview questions with sample code.
Interview questionsPrimary KeySQL
0 likes · 9 min read

This article explains the three primary ways to delete data in MySQL—using DELETE, TRUNCATE, and DROP—detailing their execution speed, underlying mechanisms, storage‑engine differences, and best‑practice considerations such as space reclamation and auto‑increment handling.
DELETEDROPMySQL
0 likes · 5 min read

This article investigates why TRUNCATE and DROP TABLE statements appear in MySQL slow‑query logs, analyzes the internal execution paths and performance bottlenecks in MySQL 5.7 and 8.0, and proposes configuration‑based optimizations and debugging techniques to mitigate the latency.
DROP TABLEInnoDBMySQL
0 likes · 13 min read

Learn practical Linux commands—dd, truncate, and fallocate—to generate large files of specific sizes for testing or troubleshooting, with clear examples and tips on choosing the fastest method.
LinuxTRUNCATEdd
0 likes · 4 min read

When you need a file of a specific size for testing or troubleshooting on Linux, you can use the dd, truncate, or fallocate commands to generate large files efficiently without manually writing data.
LinuxTRUNCATEcommand-line
0 likes · 4 min read


ITPUBNov 13, 2022 · Databases
A MySQL DBA recounts a 4‑TB InnoDB instance that stalled during startup, analyzes top, stack traces, and source code to pinpoint a bug involving truncate operations and the buf_flush_event, then presents three practical solutions—including adjusting innodb_flush_sync, using GDB to break the wait loop, or removing truncate logs—to restore normal operation.
InnoDBMySQLTRUNCATE
0 likes · 16 min read

The article explains the three primary MySQL data removal commands—DELETE, TRUNCATE, and DROP—detailing their execution speed, underlying mechanisms, impact on disk space for InnoDB and MyISAM engines, and best‑practice usage such as running OPTIMIZE TABLE after DELETE.
DELETEDROPInnoDB
0 likes · 7 min read

This article explains why undo logs can grow uncontrollably in MySQL, demonstrates how to verify and accelerate undo log truncation by adjusting purge settings in MySQL 5.7, and shows the new manual undo‑tablespace management commands introduced in MySQL 8.0.
InnoDBMySQLTRUNCATE
0 likes · 7 min read

Learn five practical Linux techniques—using shell redirection, built‑in commands, /dev/null with cat/cp/dd, echo, and truncate—to clear a file's contents without deleting the file, each with clear examples and explanations.
CATECHOFile
0 likes · 4 min read

This guide shows five practical Linux shell methods—including redirection to /dev/null, using the built‑in ':' or true commands, cat/cp/dd utilities, echo with -n, and the truncate command—to quickly clear a file’s contents without deleting the file itself.
LinuxTRUNCATEfile-management
0 likes · 3 min read

Learn five simple Linux shell techniques—including redirection to /dev/null, the true command, cat/cp/dd utilities, echo variations, and truncate—to efficiently clear a file’s contents without deleting the file itself, all explained with clear examples and code snippets.
DevNullFile ClearingLinux
0 likes · 3 min read

Learn the essential MySQL Data Manipulation Language commands—INSERT, UPDATE, DELETE, and TRUNCATE—including syntax variations, best practices, and step‑by‑step command‑line examples that illustrate single‑row, batch, and conditional operations, plus key differences between delete and truncate.
DELETEDMLINSERT
0 likes · 12 min read

After a colleague accidentally dropped a production database, we revoked DROP privileges for a MySQL user and systematically tested how this restriction impacts common operations such as renaming tables, using TRUNCATE, deleting rows, dropping objects, and recovering data via binlog, revealing surprising behaviors and practical workarounds.
DROP permissionMySQLSQL
0 likes · 9 min read

An in-depth investigation of a MySQL InnoDB startup deadlock caused by truncate operations and the innodb_flush_sync parameter, detailing log observations, stack traces, source code examination, and three practical solutions including GDB intervention, parameter adjustment, and data directory cleanup.
InnoDBMySQLTRUNCATE
0 likes · 15 min read

This article compares MySQL's three data‑removal commands—DELETE, TRUNCATE, and DROP—detailing their execution speed, underlying mechanisms, impact on disk space and auto‑increment values, and best‑practice usage with code examples and optimization tips.
DELETEDROPMySQL
0 likes · 7 min read

This article explains the three primary ways to remove data in MySQL—DELETE, TRUNCATE, and DROP—comparing their execution speed, underlying mechanisms, impact on disk space, transaction behavior, and how to reclaim space with OPTIMIZE, while providing practical SQL examples and usage warnings.
DELETEDROPMySQL
0 likes · 6 min read

This article explains why dropping large MySQL tables can heavily impact server I/O, compares ext3 and ext4 file‑system behavior, and provides a step‑by‑step method using hard links and the truncate tool to minimize downtime and I/O load.
DROP TABLEEXT4Hard Link
0 likes · 6 min read
