Tagged articles

query optimizer

31 articles · Page 1 of 1
Programmer XiaoFu
Programmer XiaoFu
Sep 29, 2026 · Databases

Why SQL Writing Order Differs from Execution Order: Explained

This article explains the difference between SQL's written clause order and its logical execution order, detailing why WHERE cannot use column aliases, how HAVING filters groups, the impact of JOIN/ON placement in LEFT JOINs, and how to verify execution plans with EXPLAIN.

EXPLAINHAVING clauseJOIN
0 likes · 9 min read
Why SQL Writing Order Differs from Execution Order: Explained
Dabaoshi
Dabaoshi
Jul 26, 2026 · Databases

From Client to Disk: The Complete Life Cycle of a MySQL Query

This article walks through every stage a MySQL statement undergoes—from client connection, authentication, and (now‑removed) query cache, through parsing, optimization, execution, and storage‑engine access—highlighting the roles of InnoDB vs MyISAM, logging mechanisms, and best‑practice table design tips.

InnoDBMyISAMMySQL
0 likes · 14 min read
From Client to Disk: The Complete Life Cycle of a MySQL Query
Dabaoshi
Dabaoshi
Jul 21, 2026 · Databases

Understanding MySQL EXPLAIN Execution Plans from Scratch

This article walks through MySQL's EXPLAIN output column by column, explaining id, table, select_type, type rankings, possible_keys, key, key_len, ref, rows, filtered, and Extra, while demonstrating each concept with concrete SQL examples, JSON‑formatted plans, and SHOW WARNINGS insights.

EXPLAINJSON formatMySQL
0 likes · 20 min read
Understanding MySQL EXPLAIN Execution Plans from Scratch
Senior Xiao Ying
Senior Xiao Ying
Feb 14, 2026 · Databases

Deep Dive into MySQL Query Optimizer: From Writing SQL to Controlling Performance

This article explains MySQL’s query execution pipeline—from parsing to the storage engine—details the cost‑based optimizer’s model, shows how it evaluates index choices versus full‑table scans, demonstrates using optimizer hints and FORCE INDEX, and provides monitoring commands and best‑practice recommendations for effective query tuning.

Cost-Based OptimizationIndex SelectionMySQL
0 likes · 9 min read
Deep Dive into MySQL Query Optimizer: From Writing SQL to Controlling Performance
21CTO
21CTO
Sep 27, 2025 · Databases

PostgreSQL 18 Unveiled: Async I/O, OAuth Security, and SQL Boosts Explained

PostgreSQL 18 introduces async I/O for faster queries, built‑in OAuth authentication, expanded SQL standard support, optimizer and extension enhancements, and tighter Kubernetes integration, delivering higher performance, stronger security, and greater flexibility for developers and DBAs tackling modern analytics, AI workloads, and distributed environments.

KubernetesOAuthPostgreSQL
0 likes · 8 min read
PostgreSQL 18 Unveiled: Async I/O, OAuth Security, and SQL Boosts Explained
StarRocks
StarRocks
Apr 24, 2025 · Databases

Inside StarRocks Optimizer: Architecture, Multi‑Stage Optimization, and Advanced Features

This article provides a comprehensive technical overview of StarRocks' query optimizer, covering its evolution, core architecture, multi‑stage optimization pipeline, key optimizations such as multi‑join colocate, low‑cardinality global dictionary, MV union rewrite, and advanced mechanisms like cost‑estimation fixes, query feedback, adaptive execution, runtime filters, join‑reorder strategies, and SQL plan management.

Cost-Based OptimizationMaterialized ViewsOLAP
0 likes · 26 min read
Inside StarRocks Optimizer: Architecture, Multi‑Stage Optimization, and Advanced Features
Big Data Technology & Architecture
Big Data Technology & Architecture
Nov 4, 2024 · Databases

Detailed Analysis of Doris SQL Execution Process: Optimizer, Scheduler, and Executor

This article provides a comprehensive walkthrough of Doris's SQL execution pipeline, covering the query optimizer's parsing, rewriting, and plan generation, the scheduler's fragment distribution, and the executor's fragment processing, including code examples of expression rewrite rules, join strategies, and data flow between FE and BE nodes.

Distributed ExecutionDorisSQL
0 likes · 30 min read
Detailed Analysis of Doris SQL Execution Process: Optimizer, Scheduler, and Executor
Efficient Ops
Efficient Ops
Jun 3, 2024 · Databases

How Does MySQL Execute a Query? Inside the Server Architecture

This article walks through how MySQL processes a SELECT query, detailing the server and storage engine layers, the roles of the connector, query cache, parser, optimizer, and executor, and provides practical command‑line examples to illustrate each step.

ConnectorExecutorMySQL
0 likes · 11 min read
How Does MySQL Execute a Query? Inside the Server Architecture
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 5, 2023 · Databases

Understanding MySQL Communication Protocols, Parsing, Optimizer, Storage Engines, and Execution Engine

This article explains how MySQL establishes connections, the supported communication protocols and message formats, the lexical and syntactic parsing process, query optimization and execution plan generation, the role of different storage engines, and how the execution engine uses the plan to operate on the storage layer.

Communication ProtocolExecution EngineMySQL
0 likes · 15 min read
Understanding MySQL Communication Protocols, Parsing, Optimizer, Storage Engines, and Execution Engine
DataFunTalk
DataFunTalk
Sep 24, 2023 · Databases

Insights into the Design and Challenges of Doris' New Optimizer (Nereids)

The article explains why Doris needed a new optimizer, describes its architecture—including rule‑based and cost‑based stages, early data‑size reduction techniques, dynamic‑programming join‑reorder methods, and practical challenges such as statistics errors and runtime filters—while sharing performance results and a Q&A session.

Cost-Based OptimizationDorisJoin Reorder
0 likes · 17 min read
Insights into the Design and Challenges of Doris' New Optimizer (Nereids)
DataFunTalk
DataFunTalk
Aug 15, 2023 · Databases

Apache Doris 2.0.0 Release Highlights and New Features

Apache Doris 2.0.0, released on August 11, 2023, introduces a new Cascades‑based optimizer, inverted index, point‑query acceleration, pipeline execution engine, multi‑tenant resource isolation, cloud‑native compute nodes, and extensive performance gains of up to ten‑fold in benchmark queries and dozens of times in real‑world workloads.

Apache DorisPerformance Boostcloud-native
0 likes · 24 min read
Apache Doris 2.0.0 Release Highlights and New Features
Architect's Guide
Architect's Guide
Jan 7, 2023 · Databases

MySQL Execution Process Overview

This article explains the complete MySQL execution flow, covering the connector, permission verification, caching, parser, optimizer, executor, process states, SQL execution order, and the impact of WHERE‑clause condition ordering on query performance.

CachingExecution ProcessMySQL
0 likes · 13 min read
MySQL Execution Process Overview
dbaplus Community
dbaplus Community
Oct 31, 2022 · Databases

Why MySQL Picks the Wrong Index for ORDER BY LIMIT Queries and How to Fix It

This article investigates a recurring MySQL CPU‑100% alarm caused by a slow SELECT with ORDER BY id ASC LIMIT, explains why the optimizer mistakenly chooses the primary‑key index over a suitable composite index, and presents six practical experiments—including force‑index, ORDER BY tweaks, and LIMIT adjustments—that reliably restore optimal index usage.

Cost ModelIndex OptimizationMySQL
0 likes · 14 min read
Why MySQL Picks the Wrong Index for ORDER BY LIMIT Queries and How to Fix It
DataFunTalk
DataFunTalk
Oct 25, 2022 · Databases

Design and Implementation of ByteHouse Query Optimizer

The article explains how ByteHouse extends ClickHouse with a full‑featured query optimizer—including rule‑based and cost‑based techniques, analyzer modules, plan construction, and distributed optimization—to overcome ClickHouse limitations and achieve significant performance gains on complex OLAP workloads.

ByteHouseCBODistributed Query
0 likes · 10 min read
Design and Implementation of ByteHouse Query Optimizer
DataFunTalk
DataFunTalk
Jul 6, 2022 · Databases

From ClickHouse to ByteHouse: Technical Optimizations and Production Practices

The whitepaper “From ClickHouse to ByteHouse” details ByteDance’s large‑scale deployment of ClickHouse, the challenges of moving it to production, and the key optimizations ByteHouse introduces—including custom table engines, a revamped query optimizer, and elastic compute‑storage separation—to achieve petabyte‑level OLAP performance.

Analytical DatabasesByteHouseClickHouse
0 likes · 6 min read
From ClickHouse to ByteHouse: Technical Optimizations and Production Practices
Qunar Tech Salon
Qunar Tech Salon
Aug 3, 2021 · Databases

Deep Dive into MySQL 8.0 Server Architecture, Parser, and Optimizer

This article analyzes MySQL 8.0.25 source code, detailing the server architecture, parser reconstruction, prepare/rewrite stages, the optimizer transformations, and the new hypergraph optimizer, while also comparing these mechanisms with PostgreSQL’s processing pipeline.

Database InternalsHypergraphMySQL
0 likes · 12 min read
Deep Dive into MySQL 8.0 Server Architecture, Parser, and Optimizer
Tencent Database Technology
Tencent Database Technology
May 31, 2021 · Databases

TXSQL Query Optimizer Framework: Transformation, Join Reorder, and Cost Model

This article introduces the TXSQL query optimizer built on MySQL 8.0.22, detailing its cascades‑style framework, transformation rewrite rules such as outer‑join elimination and subquery flattening, join‑order heuristics, cost‑model configuration, and execution strategies, providing a comprehensive overview of its design and enhancements.

Cost ModelJoin ReorderMySQL
0 likes · 25 min read
TXSQL Query Optimizer Framework: Transformation, Join Reorder, and Cost Model
Big Data Technology Architecture
Big Data Technology Architecture
Sep 30, 2020 · Databases

Core Technologies of OLAP Systems: Storage, Computation, Optimizer, and Emerging Trends

This article systematically examines the core technologies of OLAP systems, covering storage models, columnar formats, indexing, distributed storage architectures, query execution steps, optimizer designs, and emerging trends such as real‑time analytics, HTAP, cloud‑native deployment, and hardware acceleration.

OLAPcolumnar storagedistributed systems
0 likes · 23 min read
Core Technologies of OLAP Systems: Storage, Computation, Optimizer, and Emerging Trends
dbaplus Community
dbaplus Community
May 22, 2018 · Databases

Understanding PostgreSQL Query Optimizer: Rules, Subqueries, and Cost Models

This article explains PostgreSQL's query optimizer from logical and physical perspectives, covering rule‑based and cost‑based optimization, syntax tree generation, subquery/subjoin lifting, selection push‑down, equivalence‑class reasoning, strictness of expressions, and practical SQL examples.

PostgreSQLlogical optimizationphysical optimization
0 likes · 30 min read
Understanding PostgreSQL Query Optimizer: Rules, Subqueries, and Cost Models
ITPUB
ITPUB
Sep 12, 2016 · Databases

Why Oracle’s Optimizer Misestimates Multi‑Column Filters and How to Fix It

This article explains how Oracle’s Cost‑Based Optimizer can produce incorrect row estimates for queries with multiple column predicates, demonstrates the problem with a test table, and shows that gathering multi‑column statistics resolves the misestimation, improving execution plans.

Multi-Column StatisticsOracleSQL
0 likes · 8 min read
Why Oracle’s Optimizer Misestimates Multi‑Column Filters and How to Fix It
dbaplus Community
dbaplus Community
Aug 15, 2016 · Databases

Unlocking SQL: Why It Remains the Key to Databases and How to Optimize It

This comprehensive presentation explores SQL’s history, its enduring relevance amid NoSQL and NewSQL trends, explains the execution order and optimizer mechanics, offers practical optimization rules and step‑by‑step execution processes, and illustrates concepts through multiple real‑world case studies and a detailed Q&A.

Case StudiesDatabase OptimizationSQL
0 likes · 23 min read
Unlocking SQL: Why It Remains the Key to Databases and How to Optimize It