Tag

SQL Optimization

0 views collected around this technical thread.

IT Xianyu
IT Xianyu
Jun 12, 2025 · Databases

Why Mastering MySQL Slow Query Log Is Essential for Performance

This guide explains what the MySQL slow query log is, why it matters for performance, how to check its status, enable it temporarily or permanently in Docker‑based deployments, troubleshoot command‑not‑found errors, read the log file, and filter entries to focus on the truly slow queries.

Database PerformanceDockerMySQL
0 likes · 6 min read
Why Mastering MySQL Slow Query Log Is Essential for Performance
Java Tech Enthusiast
Java Tech Enthusiast
Jun 8, 2025 · Databases

Why DELETE Is Discouraged in MySQL and When to Use DROP or TRUNCATE

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
Why DELETE Is Discouraged in MySQL and When to Use DROP or TRUNCATE
Aikesheng Open Source Community
Aikesheng Open Source Community
May 28, 2025 · Databases

Analyzing and Optimizing Slow OceanBase SQL Queries Using TopSQL and Execution Plan Rewrites

This article investigates a slow OceanBase SQL query by examining CPU and TopSQL metrics, dissecting the execution plan, identifying batch join inefficiencies, rewriting the SQL for better performance, and demonstrating a reduction in execution time from over 2600 seconds to under one second.

Batch JoinDatabase PerformanceOceanBase
0 likes · 18 min read
Analyzing and Optimizing Slow OceanBase SQL Queries Using TopSQL and Execution Plan Rewrites
Aikesheng Open Source Community
Aikesheng Open Source Community
May 27, 2025 · Databases

MySQL Execution Plans in Tree Format

This article introduces MySQL's tree‑style execution plan output using EXPLAIN FORMAT=TREE, explains its advantages over traditional and JSON formats, and demonstrates its practical use through eight detailed SQL examples with full plan analysis and performance insights.

DatabaseMySQLSQL Optimization
0 likes · 12 min read
MySQL Execution Plans in Tree Format
Architecture & Thinking
Architecture & Thinking
May 14, 2025 · Databases

Master MySQL EXPLAIN: Decode Execution Plans to Boost Query Performance

This article explains how to use MySQL's EXPLAIN command to analyze slow queries, interprets each field in the execution plan, provides practical examples and optimization techniques, and offers advanced diagnostics for improving index usage and overall SQL performance.

EXPLAINIndexingMySQL
0 likes · 10 min read
Master MySQL EXPLAIN: Decode Execution Plans to Boost Query Performance
Top Architect
Top Architect
May 10, 2025 · Backend Development

Optimizing a High‑Concurrency Backend Interface: Reducing Response Time from 30 seconds to 0.8 seconds

This article presents a real‑world case study of a high‑traffic backend API that originally took 30 seconds to process over two million records, detailing problem diagnosis, SQL and Java code analysis, and a series of optimizations—including SQL rewrites, database‑side aggregation, and Caffeine caching—that ultimately cut the response time to under one second.

Caffeine CacheJavaMyBatis
0 likes · 13 min read
Optimizing a High‑Concurrency Backend Interface: Reducing Response Time from 30 seconds to 0.8 seconds
Top Architecture Tech Stack
Top Architecture Tech Stack
May 10, 2025 · Databases

MySQL Query Optimization Guidelines and Best Practices

This article presents a comprehensive set of MySQL optimization techniques, covering the avoidance of SELECT *, proper use of specific fields, index-friendly query patterns, join strategies, handling of NULL and default values, efficient use of UNION, batch inserts, and numerous other performance‑enhancing tips for database developers.

Database TuningIndexesJOIN
0 likes · 17 min read
MySQL Query Optimization Guidelines and Best Practices
Java Architect Essentials
Java Architect Essentials
Apr 7, 2025 · Databases

Practical MySQL Query Optimizations: LIMIT, Implicit Conversion, Join Rewrite, Mixed Sorting, EXISTS, Predicate Push‑down, Early Row Limiting, and Intermediate Result Push‑down

This article presents a series of MySQL performance‑tuning techniques—including smarter LIMIT usage, avoiding implicit type conversion, rewriting joins, handling mixed ordering, replacing EXISTS with joins, pushing predicates into subqueries, early row limiting, and using WITH clauses—to dramatically reduce query execution time across common scenarios.

DatabaseIndexesJOIN
0 likes · 13 min read
Practical MySQL Query Optimizations: LIMIT, Implicit Conversion, Join Rewrite, Mixed Sorting, EXISTS, Predicate Push‑down, Early Row Limiting, and Intermediate Result Push‑down
vivo Internet Technology
vivo Internet Technology
Apr 2, 2025 · Databases

Case Study of Slow SQL Governance in an Activity Middleware System

The case study details how an activity‑middleware platform tackled slow SQL problems by cleaning historic data, introducing sharding and Elasticsearch off‑loading, optimizing queries with proper indexes and simplified joins, and automating nightly deletions, ultimately cutting daily slow queries from thousands to double‑digit levels and boosting system stability.

Database PerformanceIndexingMySQL
0 likes · 17 min read
Case Study of Slow SQL Governance in an Activity Middleware System
Java Tech Enthusiast
Java Tech Enthusiast
Mar 23, 2025 · Databases

MySQL Query Optimization Techniques: LIMIT, Implicit Conversion, Joins and More

The article shows how common MySQL performance pitfalls—such as large LIMIT offsets, implicit type conversions, sub‑query‑based updates or deletes, mixed ORDER BY, EXISTS clauses, and misplaced predicates—can be rewritten into index‑friendly forms using filters, joins, early limits, UNION ALL, and CTEs to achieve execution times that drop from seconds to milliseconds.

IndexesJOINMySQL
0 likes · 14 min read
MySQL Query Optimization Techniques: LIMIT, Implicit Conversion, Joins and More
Java Tech Enthusiast
Java Tech Enthusiast
Mar 11, 2025 · Databases

Performance Analysis of MySQL 5.7 to 8.0 Upgrade and ORDER BY Optimization

After upgrading from MySQL 5.7 to 8.0, a client observed that ORDER BY queries on wide SELECTs became dramatically slower because MySQL 8.0 deprecated the max_length_for_sort_data setting, causing the optimizer to perform full‑field sorting instead of index‑based sorting; adding an index on the ordered column restores performance.

DatabaseMySQLSQL Optimization
0 likes · 6 min read
Performance Analysis of MySQL 5.7 to 8.0 Upgrade and ORDER BY Optimization
Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 3, 2025 · Databases

MySQL 5.7 → 8.0 Upgrade: Performance Degradation Analysis and Optimization

After upgrading a client from MySQL 5.7 to 8.0, query performance slowed dramatically due to changes in ORDER BY handling, and the article analyzes the root cause, presents verification tests, and recommends adding indexes to restore millisecond‑level response times.

IndexingMySQLORDER BY
0 likes · 7 min read
MySQL 5.7 → 8.0 Upgrade: Performance Degradation Analysis and Optimization
Big Data Technology Architecture
Big Data Technology Architecture
Feb 8, 2025 · Big Data

How AI Can Accelerate Data Engineering: Practical DeepSeek Use Cases and Tips

This article shows how AI tools like DeepSeek can dramatically speed up data‑engineering tasks—such as fixing long‑running SQL queries, building real‑time data pipelines with Flink, and deciphering legacy stored procedures—while offering concrete prompts, real‑world case studies, and five time‑saving techniques.

AIAutomationBig Data
0 likes · 6 min read
How AI Can Accelerate Data Engineering: Practical DeepSeek Use Cases and Tips
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 21, 2025 · Databases

Understanding MySQL EXPLAIN EXTRA Hints: Impossible, No Matching, Recursive, Rematerialize, and Canned N Databases

This article explains the meaning and optimization strategies for various MySQL EXPLAIN EXTRA hints—including Impossible WHERE/HAVING, No matching rows, Recursive queries, Rematerialize, and canned N databases—provides example execution plans, code snippets, and performance comparisons to help developers write more efficient SQL statements.

Database PerformanceEXPLAINMySQL
0 likes · 10 min read
Understanding MySQL EXPLAIN EXTRA Hints: Impossible, No Matching, Recursive, Rematerialize, and Canned N Databases
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 14, 2025 · Databases

Understanding the Extra Column in MySQL EXPLAIN Output

This article explains the meaning of the Extra column in MySQL EXPLAIN results, covering common values such as Using index, Backward index scan, Select tables optimized away, and Zero limit, and shows how to interpret and optimize each case with concrete examples.

DatabaseEXPLAINIndexes
0 likes · 15 min read
Understanding the Extra Column in MySQL EXPLAIN Output
Aikesheng Open Source Community
Aikesheng Open Source Community
Dec 26, 2024 · Databases

Detailed Explanation of Common JOIN Scenarios in the EXPLAIN TYPE Column

This tutorial walks through MySQL's EXPLAIN TYPE column, illustrating how different join types such as const, eq_ref, ref, range, and index affect query performance using concrete SQL examples and execution‑plan analysis on a sample table with a composite primary key.

Database IndexesEXPLAINJOIN
0 likes · 11 min read
Detailed Explanation of Common JOIN Scenarios in the EXPLAIN TYPE Column
58 Tech
58 Tech
Dec 19, 2024 · Big Data

Architecture Evolution and Implementation of the Intelligent Acceleration Engine in the 58 Big Data Platform

The article details the background, architectural analysis, multi‑tenant redesign, engine selection enhancements, compatibility adaptations, stability fixes, containerized deployment, performance optimizations, and measurable business outcomes of the Intelligent Acceleration Engine upgrade using Apache Kyuubi and StarRocks within the 58 big data platform.

Apache KyuubiBig DataContainerization
0 likes · 12 min read
Architecture Evolution and Implementation of the Intelligent Acceleration Engine in the 58 Big Data Platform
JD Tech
JD Tech
Dec 13, 2024 · Databases

MySQL Join Algorithms and Optimization Techniques

This article explains how multi‑table joins in MySQL can become performance bottlenecks and walks through the four join algorithms—Simple Nested‑Loop, Block Nested‑Loop, Hash, and Index Nested‑Loop—showing their execution plans, code examples, and step‑by‑step optimizations using indexes and join buffers to dramatically improve query speed.

DatabaseIndexingMySQL
0 likes · 19 min read
MySQL Join Algorithms and Optimization Techniques
Top Architecture Tech Stack
Top Architecture Tech Stack
Dec 5, 2024 · Databases

Advanced MySQL Query Optimization Techniques: LIMIT, Implicit Conversion, Join Updates, Mixed Sorting, EXISTS, Predicate Pushdown, Early Range Reduction, and CTEs

This article explains common MySQL performance pitfalls such as large‑offset LIMIT queries, implicit type conversion, sub‑query updates, mixed sorting, inefficient EXISTS clauses, predicate push‑down limitations, and demonstrates how rewriting with proper indexes, JOINs, early range reduction, and WITH (CTE) statements can reduce execution time from seconds to milliseconds.

IndexesMySQLPredicate Pushdown
0 likes · 12 min read
Advanced MySQL Query Optimization Techniques: LIMIT, Implicit Conversion, Join Updates, Mixed Sorting, EXISTS, Predicate Pushdown, Early Range Reduction, and CTEs