How does Oracle's SQL statement work?

Source: Internet
Author: User

How does Oracle work?

    • Select ID , name from the T order by ID;

–sql parsing (see if the syntax is incorrect, if there are no errors, parse the semantics, execute permissions on this statement)

– Execution Plan (howORACLE accesses data and takes data according to execution plan)

– Execute SQL

? Read data from disk (if data is not in memory, go to disk to read)

? Processing (data is processed when it is read into memory.) sorting, grouping, etc.)

? Returns The result (returns the result to the user)

    • Insert into t values (1, ' tigerfish ');

–sql parsing

– Execution Plan

– Execute SQL

? Read data blocks from disk (if not in memory)

? Modifying the rollback segment Data block (generating redo log at the same time )----Oracle feature (put data before data modification to rollback data block)

? Modify the original data Block (Generate redo logat the same time)

    • Create table T values (ID int,name varchar2 (10);

–sql parsing

– Execution Plan

– Execute SQL

? Allocates the initialized storage space (segment)to the object, resulting in some undo and redo logs.

? Create new Object-related information (tables, fields , various properties ...) in the Oracle dictionary table . .), generating some undo and redo logs.

    • Drop table T purge ( truncate TABLE T);

–sql parsing

– Execution Plan

– Execute SQL

? reclaims the space occupied by the object , resulting in some undo and redo logs.

? Information about objects that are deleted in the Oracle Dictionary table (table, fields , various properties ...) .), generating some undo and redo logs.

How does Oracle's SQL statement work?

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.