The query process for a SELECT statement by an Oracle database is shown in the following illustration:
As we know from the above picture,
There are three main steps: The client sends a SELECT statement to the server, the server executes the SQL statement, and the fetch data is returned to the client.
The first step is that the client sends the SELECT statement to the client;
The second step is to execute the SQL statement;
There are a number of small tasks that are involved in executing SQL statements:
1, retrieve the cache, if there is the same execution plan, directly from the memory to get the data and return to the client, if you do not perform the following steps
2, the grammar analysis, is only the analysis of the grammatical rules, does not include the table, column is in the database
3, semantic analysis, for tables, columns and so on analysis
4, the analysis of locks to prevent data inconsistency occurred
5, the right to check to determine whether the user has access to this data permissions
6, the implementation plan, Oracle database for SELECT statement analysis, to find the best implementation strategy, while saving to the cache
7. Execute SQL statement
Step Three: Extract the data to the client, and the server's execution program will return the read data to the client.
Reprint Please specify: http://blog.csdn.net/coolwzjcool/article/details/7321454