Steps for Oracle to execute SQL query statements

Source: Internet
Author: User

Steps for Oracle to execute SQL query statements
The SQL query statement executed by Oracle is different from that of other statements. If the query statement is successfully executed, the query result is returned. Other types of SQL statements only return successful or failed execution information. Oracle processes query statements in three major stages: parse, execute, and fetch ).

  • Parse: during compilation, the server process puts the SQL statement content into the library cache of the shared pool, and completes the following processing:
    • First, check whether the same SQL statement is included in the Shared Pool. If not, perform subsequent processing.
    • Check whether the SQL statement syntax is correct.
    • View the data dictionary to check the definitions of tables and columns related to SQL statements.
    • Add a compilation lock (parse locks) to the objects operated by the SQL statement so that the definition of these objects will not change during the compilation statement.
    • Check whether the user has permissions on the objects referenced by the SQL statement.
    • Generate the SQL Execution Plan.
    • Place SQL statements and execution plans in the shared SQL zone.
  • Execute: The compiled SQL statement is executed by the Oracle server process.
  • Fetch: the Oracle server process selects the desired data row, sorts it as needed, and finally returns the result to the user process.

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.