T
traeai
Sign in
返回首页
dbaplus社群

One UPDATE Statement Without Index Crashed the Business!

5.0Score
One UPDATE Statement Without Index Crashed the Business!

TL;DR · AI Summary

A single UPDATE statement without an index caused full table scan, lock contention, and connection exhaustion, ultimately crashing the business.

Key Takeaways

  • Unindexed UPDATE triggered full table scan, taking 12 minutes to execute
  • Single operation consumed over 100 connections, exhausting connection pool
  • Lack of pre-execution slow query detection and change approval process

Outline

Jump quickly between sections.

  1. A business system experienced severe database performance degradation during an early-morning UPDATE execution due to missing index.

  2. Slow query logs revealed the UPDATE took over 10 minutes with no index support.

  3. The operation caused widespread lock waits, leading to timeouts and eventual service unavailability.

  4. The developer failed to create an index on the WHERE clause field, and the change was not tested or reviewed.

  5. Long-running transaction was terminated immediately, index rebuilt, and service restored with traffic replay validation.

Mindmap

See how the topics connect at a glance.

查看大纲文本(无障碍 / 无 JS 友好)
  • 一条没带索引的UPDATE语句导致业务崩溃
    • 事故起因
      • 缺少WHERE字段索引
      • 未经过SQL审核
    • 技术后果
      • 全表扫描,耗时12分钟
      • 锁竞争加剧
      • 连接池耗尽
    • 管理缺陷
      • 缺乏变更审批流程
      • 无慢查询预警机制

Highlights

Key sentences worth saving and sharing.

#MySQL#SQL Optimization#Database Failure#Operations Monitoring
Open original article

Environment Exception

The current environment is abnormal. You can continue accessing after completing verification.

Go to Verify

AI may generate inaccurate information. Please verify important content.