Tagged articles
query optimizer
31 articles · Page 1 of 1
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 clauseLEFT JOIN
0 likes · 9 min read

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

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

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


21CTOSep 27, 2025 · Databases
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

This article provides a comprehensive overview of MySQL's architecture, covering the client layer, connectors, lexical analysis, query optimizer, executor, storage engines, caching, and logging, and explains how each component contributes to a robust, high‑performance database system.
Database ArchitectureLoggingMySQL
0 likes · 6 min read

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 OptimizationOLAPSQL Plan Management
0 likes · 26 min read

This article explains MySQL's optimizer_switch system variable, how it consists of on/off flags that fine‑tune the query optimizer, shows how to view and modify the flag set, and details the most important flags such as index_merge, ICP, materialization, and others.
ICPMySQLindex_merge
0 likes · 10 min read

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

This article explains what MySQL Hints are, why they are needed for performance tuning and execution‑plan stability, and provides step‑by‑step guidance on writing, attaching, testing, and validating hints, along with a comprehensive list of common hints and their usage examples.
HintsIndexMySQL
0 likes · 13 min read

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.
ConnectorDatabase ArchitectureExecutor
0 likes · 11 min read

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

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 OptimizationDatabase PerformanceDoris
0 likes · 17 min read

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

This article breaks down MySQL's query optimizer cost model by detailing how full‑table‑scan cost is computed, covering the underlying formulas, required statistics, memory‑vs‑disk page ratios, and configurable cost constants with concrete code examples.
MySQLcost-modelfull table scan
0 likes · 8 min read

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

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.
Index OptimizationMySQLcost-model
0 likes · 14 min read

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

This article provides a comprehensive technical overview of StarRocks' query optimizer, covering its cascades/ORCA-inspired architecture, logical and physical plan transformations, cost modeling, statistics derivation, memo structure, task scheduling, and practical examples of join optimization in a distributed OLAP engine.
CascadesOLAPStarRocks
0 likes · 14 min read

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

This article explains MySQL's internal execution process—including the connector, cache, parser, optimizer, and executor—describes privilege tables and verification, discusses query caching removal, outlines logical SQL execution order, and provides practical tips for ordering WHERE conditions to improve performance.
Database InternalsMySQLPerformance Tuning
0 likes · 12 min read

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

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.
Join ReorderMySQLTransformation
0 likes · 25 min read

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

This article explains the concepts of cardinality and HINT in MySQL, demonstrates how inaccurate cardinality can lead to sub‑optimal execution plans, and shows how applying index_merge hints dramatically reduces query cost and row scans for multi‑column predicates.
CardinalityIndex HintMySQL
0 likes · 7 min read

This article walks through the internal processing steps MySQL follows for a simple SELECT query, covering the connector, parser, optimizer, and executor, and explains how the server and storage engine layers collaborate to execute and return results efficiently.
MySQLSQL executionServer layer
0 likes · 5 min read

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

This article walks through the internal structures of MySQL, Oracle, and PostgreSQL, detailing their logical and storage layers, key modules, process interactions, memory components, and how these elements cooperate to handle client requests and ensure data integrity.
Database ArchitectureMySQLOracle
0 likes · 24 min read

The article explains the Materialized View Based Optimizer (MBO) in Inceptor, detailing its purpose, configuration parameters, supported aggregation, filter, and join scenarios, and shows how combining MBO with Transwarp Rubik cubes can dramatically accelerate OLAP query performance.
InceptorMaterialized ViewOLAP
0 likes · 12 min read


ITPUBSep 12, 2016 · Databases
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

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 StudiesPerformance TuningSQL
0 likes · 23 min read
