SQL Engine - SQL processing (Sql Compiler)

> (Data|State) Management and Processing > (Data Type|Data Structure) > (Relation|Table) - Tabular data > RDBMS - Sql Processing (Engine)

1 - About

In which way the database processes:

  • DDL statements to create objects,
  • DML to modify data, and
  • queries to retrieve data.

3 - Stages of SQL Processing

Depending on the statement, the database may omit some of these steps.

3.1 - Parsing

3.2 - Optimization

SQL Engine - Query Optimizer (Query Optimization)

Query optimization is the process of choosing the most efficient means of executing a SQL statement. The database optimizes queries based on the optimizer statistics collected about the actual data being accessed.

The optimizer uses statistics such as :

  • the number of rows,
  • the size of the data set,
  • and other factors

to generate possible execution plans,

  • assigning a numeric cost to each plan.

The database uses the plan with the lowest cost.


3.3 - Row Source Generation

3.4 - Execution

4 - Documentation / Reference