SQL Join Optimization

When a query is submitted, the Query Processor parses and verifies the query (see SQL Parsing and Verification). If the query passes the parsing and verification checks, the Query Processor begins the optimization process.

During the optimization process, the Query Processor performs calculations on every possible permutation for accessing the information required for your query. It then chooses the permutation that places the least demand on system resources. This means that your query is executed as efficiently as possible.

The optimization process is called the SQL Join Optimization phase, and to perform it, the Query Processor uses the SQL Join Optimization Algorithm.

The SQL Join Optimization Algorithm consists of four stages:

  1. Build the Sub-Clause List
  2. Determine the Sub-Clause Types
  3. Calculate the Table Order Permutations
  4. Calculate the Cost and Determine the Final Access Plan.

In each of the above sections, SQL terms are used frequently. If you are unfamiliar with SQL terminology or need extra information about a term, please refer to SQL Terminology.


ClearSCADA 2017 R2