Function documentationSearch Strategies Locate this document in the navigation structure

 

Usually, the database system can use several different strategies (“search strategies”) to access data. Among other things, these search strategies differ in the costs that they incur when executed.

Features

The simplest search strategy is the sequential search (table scan), in which the database system searches through the entire table, row-by-row. However, for large quantities of data, the sequential search is often the most complex and expensive search strategy. For this reason, the SQL Optimizer analyzes other search strategies that scan smaller areas of the table.

The search strategies available depend on the search condition, the structure of the SQL statement and the design of the database (primary key and so on). This documentation describes the following search conditions and the search strategies that result from them:

Activities

To find out which search strategy the SQL Optimizer has chosen for an SQL statement, use the EXPLAIN statement.