SQL Engine - SQL processing (Sql Compiler)

About

In which way the database processes:

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

Stages of SQL Processing

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

Parsing

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.

Row Source Generation

Execution

SQL Engine - Execution

Documentation / Reference


Powered by ComboStrap