Steps for Oracle to execute SQL query statements

Source: Internet
Author: User

The execution of the SQL statement is primarily done by the user process and the server process, and some other processes may have to assist in completing the process.

Query statements differ from other SQL statements, and if a query statement succeeds, it returns the results of the query, while the other SQL statements simply return information about the success or failure of the execution.

Query statements are primarily

The execution of the SQL statement is primarily done by the user process and the server process, and some other processes may have to assist with this process.

Query statements differ from other SQL statements, and if a query statement succeeds, it returns the query results, while the other SQL statements simply return information about the success or failure of the execution.

The processing of query statements mainly consists of the following 3 stages: compiling, executing and extracting data.

Compile: At compile time, the server process puts the body of the SQL statement into the library cache of the shared pool and completes the following processing.

1. First search in the shared pool for the same SQL statement, and if not, follow-up processing.

2. check that the syntax of the SQL statement is correct

3. Check the definition of tables and columns by looking at the data dictionary

4. Compile locks on the objects being manipulated so that the definitions of these objects cannot be changed during the compilation of the statements

5. Check the permissions of the lock reference object

6. Generate the optimization execution conditions required to execute the SQL statement

7. Load the execution plan of the SQL statement into the shared SQL area

Execution: The Oracle server process begins executing the SQL statement because it has obtained all the resources and information needed to execute the SQL statement.


Extract data: The data rows that are required by the Oracle server process are selected and sorted when needed, and the results are returned to the user

Steps for Oracle to execute SQL query statements

Related Article

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.