Tagged articles
query execution
35 articles · Page 1 of 1
This article explains the logical execution order of SQL clauses (FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, LIMIT), why SELECT aliases aren't visible in WHERE, how HAVING differs from WHERE, JOIN/ON placement, LEFT JOIN pitfalls, and how to verify with EXPLAIN, distinguishing logical vs. physical execution order.
EXPLAINHAVINGLEFT JOIN
0 likes · 8 min read

When a client sends an SQL statement over TCP, the parser checks syntax and semantics and builds a query tree, the optimizer evaluates possible execution plans using statistics to estimate costs and selects the most efficient one, and the executor runs the plan, using the buffer manager for reads or the transaction manager for updates while the lock manager enforces ACID properties.
SQLdatabaseoptimization
0 likes · 3 min read

This article presents a comprehensive overview of Meta's open‑source Velox query execution engine, detailing its architecture, vectorized execution model, memory‑pool hierarchy, arbitrator and allocator designs, spilling techniques, and future development plans for large‑scale data processing.
SpillingVectorized EngineVelox
0 likes · 24 min read

This guide explains the step‑by‑step SQL execution sequence, offers practical tips for optimizing multi‑table joins, and provides comprehensive indexing recommendations to improve query performance and reduce resource consumption.
Database PerformanceSQLindexing
0 likes · 7 min read

This article explains the logical execution order of SQL statements—including FROM‑JOIN, WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY and LIMIT—illustrates each step with examples and diagrams, and clarifies common misconceptions about clause sequencing.
SQLSQL ClausesSQL Tutorial
0 likes · 5 min read

This article explains the complete lifecycle of a MySQL SELECT statement, covering the server and storage‑engine layers, the roles of the connector, query cache, parser, optimizer and executor, and provides concrete command‑line and SQL examples.
Database ArchitectureMySQLOptimizer
0 likes · 10 min read


21CTOAug 29, 2023 · Databases
This article demystifies the actual execution sequence of SQL queries, detailing how FROM and JOIN establish table relationships, WHERE filters rows, GROUP BY groups data, HAVING applies aggregate conditions, SELECT retrieves fields, ORDER BY sorts results, and LIMIT restricts the final output.
SQLSQL Optimizationdatabase
0 likes · 6 min read

This article explains the true execution sequence of SQL statements—starting with FROM and JOIN, then WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY, and LIMIT—illustrating each step with diagrams, examples, and code snippets to clarify how databases process queries.
FROMHAVINGORDER BY
0 likes · 6 min read

This article walks through MySQL 8.0.32 source code to explain how the server builds a tree for a WHERE clause, evaluates each condition using classes such as Item_cond_and, Item_cond_or, Item_func_gt, and Item_func_eq, and ultimately decides whether a row satisfies the query.
MySQLSQLSource Code Analysis
0 likes · 19 min read

This article explains the logical execution sequence of a typical SQL query, detailing each phase from FROM/JOIN/WHERE through GROUP BY, HAVING, SELECT, ORDER BY, and LIMIT, and illustrating the process with diagrams and code examples.
From Join WhereHAVINGLIMIT
0 likes · 8 min read

This article explains the step‑by‑step execution order of a standard SQL query, covering FROM/JOIN, WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY and LIMIT, and provides illustrative code snippets and diagrams to clarify each stage.
FROMHAVINGLIMIT
0 likes · 5 min read

This article explains the core concepts, architecture, and source‑code details of StarRocks’ Pipeline execution framework, covering BE initialization, query lifecycle management, operator splitting, PipelineBuilder processing, and the scheduling logic of PipelineDriver, with concrete code examples and diagrams to illustrate each step.
Database EnginePipelineStarRocks
0 likes · 21 min read

This article breaks down the step-by-step SQL execution sequence—from FROM and JOIN through WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY, to LIMIT—illustrating each phase with examples, diagrams, and code snippets to help you understand how queries are processed and optimized.
FROMHAVINGLIMIT
0 likes · 7 min read

This article explains the standard SQL query execution sequence—including FROM/JOIN, WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY, and LIMIT—illustrating each step with examples, code snippets, and diagrams to clarify how data is retrieved and processed.
Data RetrievalSQLSQL Clauses
0 likes · 5 min read

This article walks through the complete lifecycle of a MySQL SELECT statement, from establishing the TCP connection and authentication, through query cache, parsing, optimization, and execution, detailing how the server and storage engine collaborate and explaining concepts like index usage, connection handling, and memory management.
Database ArchitectureIndex OptimizationMySQL
0 likes · 20 min read

This article provides a comprehensive overview of MySQL's internal execution flow—from client connection handling, permission verification, caching, parsing, optimization, and execution—to the detailed SQL execution order, helping readers grasp how queries are processed and optimized within the database engine.
Execution ProcessMySQLdatabase
0 likes · 12 min read

This article explains the complete MySQL query processing pipeline, covering the connector, authentication, privilege checks, caching, parser, optimizer, executor, and the detailed SQL execution order with examples of each stage, helping readers understand and optimize their SQL statements.
MySQLSQLdatabase
0 likes · 13 min read

Citus extends PostgreSQL into a shared‑nothing distributed system where a coordinator node routes queries to worker nodes, supporting distributed, reference, and local tables, shard placement, replication modes, co‑location, parallel execution, and configurable connection‑pool settings to scale storage and CPU across a cluster.
CitusDistributed DatabasePostgreSQL
0 likes · 12 min read

This article walks through MySQL’s internal query processing pipeline, the roles of the connector, parser, optimizer and executor, explains InnoDB’s redo log and binlog mechanisms with a WAL analogy, and details transaction ACID properties, isolation levels, and concurrency anomalies.
ACIDInnoDBMySQL
0 likes · 20 min read

The article explains the true execution order of SQL queries, detailing each step from FROM and JOIN through WHERE, GROUP BY, HAVING, SELECT, DISTINCT, ORDER BY, and LIMIT, and illustrates the concepts with examples and code snippets.
FROMHAVINGLIMIT
0 likes · 6 min read

This article walks through MySQL 8.0’s SQL optimizer, explaining how a raw SQL statement is parsed, transformed, and optimized through stages such as Setup, Resolve, Derived‑table merging, materialization, window‑function handling, and ROLLUP processing, illustrated with diagrams and code examples.
MySQLRollupSQL Optimizer
0 likes · 20 min read

This article explains the purpose and interpretation of each column in MySQL's EXPLAIN output, covering identifiers, select types, table sources, partition info, access types, possible keys, actual keys, key lengths, row estimates, filtering percentages, and extra execution details, with visual examples and code snippets.
EXPLAINMySQLSQL
0 likes · 10 min read

This article explains MySQL’s internal architecture—including server and storage engine layers—and walks through each stage of query processing from connection and authentication, through query cache, parsing, optimization, and execution, illustrated with a concrete SELECT example.
Database ArchitectureMySQLSQL
0 likes · 9 min read

This article explains in detail how ClickHouse processes a user‑submitted SQL query, covering the server’s request handling, parsing, query rewrite, optimization, interpreter execution, and result transmission, while illustrating key source code snippets and architectural components.
BackendClickHouseDatabase Internals
0 likes · 18 min read

This article explains why SQL queries do not start with SELECT, outlines the typical logical execution order of clauses such as FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY, and LIMIT, and discusses how database engines may reorder operations for optimization, with code examples and comparisons to LINQ and pandas.
LINQPandasSQL
0 likes · 6 min read

SQLECTRON is a simple, lightweight cross‑platform SQL client supporting MySQL, PostgreSQL, SQL Server, SQLite and Cassandra; this guide walks through installing the v1.30.0 desktop app on macOS, configuring servers, executing queries, exporting results, and highlights its terminal variant and comparison with heavier tools.
SQL ClientSQLECTRONcross-platform
0 likes · 5 min read

Discover the true execution sequence of SQL queries, why SELECT runs fifth, how window functions and GROUP BY interact, and the impact of engine optimizations, illustrated with diagrams and code examples spanning aliases, LINQ, and pandas.
LINQPandasSQL
0 likes · 6 min read

This article explains MySQL’s internal workflow, covering the Server layer components, Storage Engine layer, connection handling, query cache behavior, lexical and syntax parsing, optimization decisions, and execution steps, including tips for long‑connection management and common pitfalls.
Connection ManagementDatabase InternalsMySQL
0 likes · 9 min read

This article walks through the complete lifecycle of a SQL SELECT statement—using simple Citizen and City tables—to illustrate the six processing stages (FROM/JOIN, WHERE, GROUP BY, HAVING, SELECT, ORDER BY/LIMIT), showing how each clause transforms the data step by step.
SQLdatabase-fundamentalsquery execution
0 likes · 5 min read

Although most SQL statements begin with SELECT, the actual execution follows a specific order—WHERE, GROUP BY, HAVING, then SELECT—illustrated by a diagram that also clarifies common misconceptions about filtering window functions, column aliases, and how databases may reorder operations for optimization.
LINQPandasSQL
0 likes · 6 min read

This article explains the actual logical execution order of SQL statements, clarifies common misconceptions about WHERE, GROUP BY, and SELECT, shows how column aliases affect processing, discusses optimizer reordering, and compares the order with LINQ and pandas query patterns.
LINQPandasSQL
0 likes · 7 min read

This article explains MySQL index design principles, demonstrates the execution steps of a range query on a sample table, and discusses common index optimizations such as covering indexes, the left‑most prefix rule, index condition push‑down, implicit type conversion, as well as why the optimizer may choose a wrong index and how to correct it.
Database PerformanceIndex OptimizationMySQL
0 likes · 9 min read

The article explains that SQL queries are not executed in the order written—SELECT is evaluated fifth after FROM, WHERE, GROUP BY, and HAVING—illustrates this logical sequence with diagrams, discusses alias handling, optimizer reordering, and shows comparable patterns in LINQ, pandas, and dplyr.
SQLWindow Functionsdatabases
0 likes · 6 min read

This comprehensive guide explains how SQL's declarative nature, the mismatch between syntax and execution order, table references, various join types, derived tables, GROUP BY behavior, and key keywords like DISTINCT, UNION, ORDER BY, and OFFSET work together to help readers master SELECT statements.
JoinsSQLdatabase-fundamentals
0 likes · 20 min read

This article explains the step‑by‑step order in which MySQL processes a SELECT statement, detailing how each clause creates a virtual table that feeds into the next operation until the final LIMIT result is returned to the user.
MySQLSQLVirtual Tables
0 likes · 3 min read
