Entering content frame

Process documentation How the Optimizer works Locate the document in the library structure

Purpose

SQL statements merely specify the desired results. They do not contain any information as to how the database system should search for the data. The database system can often choose from multiple options for finding the data required by the SQL statement.

The Optimizer has the task of determining the best search strategy for accessing the data.

Process Flow

...

       1.      A user or a database application sends an SQL statement with a search condition to the database.

       2.      Automatic Transformation of the SQL Statement

       3.      The database system starts the SQL Optimizer.

       4.      The SQL Optimizer determines all the search strategies with which the database can access the data specified in the SQL statement.

       5.      It determines the costs for each individual search strategy.

       6.      It chooses the strategy that would incur the lowest costs in executing the SQL statement.

       7.      The database system executes the SQL statement with this search strategy.

 

Leaving content frame