SQL statements merely specify the results that are desired. 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 specified in the SQL statement.
The SQL optimizer is responsible for determining the best search strategy for accessing the data.