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?