One of Oracle's in-depth analysis: the principle of SELECT statement query [reprint please indicate]__oracle

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.