How the Oracle Database Locks Data
Locking is performed automatically and requires no user action. Implicit locking occurs for SQL statements as necessary, depending on the action requested. Implicit locking occurs for all SQL statements except SELECT.
The users can also lock data manully, which is called explicit locking.
There are four categories of data dictionary views; each category has a distinct prefix that reflects its intended use.
USER_ : These views contain information about objects owned by the user
ALL_ : These views contain information about all of the tables(object tables and relational tables) accessible to the user
DBA_ : These views are restricted views, which can be accessed only by people who have been assigned the DBA role
V$ : These views are dynamic performance views, database server performance, memory, and locking
Removing rows with the TRUNCATE statement is faster than removing them with the DELETE statement for the following reasons:
The TRUNCATE statement is a data definition language(DDL) statement and generates no rollback information
Truncating a table does not fire the delete triggers of the table
If the table is the parent of a referential integrity constraint, you cannot truncate the table. Disable the constraint before issuing the TRUNCATE statement.
阅读(2170) | 评论(0) | 转发(0) |