Entering content frame

Background documentation Search Strategies Locate the document in its SAP Library structure

The database system can generally use various different strategies to access data (known as search strategies).

Among other things, these search strategies differ in the costs that they incur when executed. The simplest search strategy is the sequential search, in which the entire table is scanned, row-by-row. However, for large quantities of data, the sequential search is often the most costly search strategy. For this reason, Optimizer analyzes other search strategies that scan smaller areas of the table.

The available search strategies 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 cases:

·        Search Conditions for Key Columns

·        Search Conditions for Indexed Columns

·        Restrictions for UPDATE Statements

·        Search Conditions Linked with OR

·        Postponement of the Search to the FETCH Time

·        Join

You can use the EXPLAIN statement to find out the search strategy that was chosen by Optimizer for an SQL statement.

See also:

List of All Search Strategies

Tips on Database Design

 

Leaving content frame