ITPub博客

首页 > IT基础架构 > 网络安全 > Default Locking for Queries (350)

Default Locking for Queries (350)

原创 网络安全 作者:tsinglee 时间:2007-12-11 11:45:43 0 删除 编辑

Queries are the SQL statements least likely to interfere with
other SQL statements because they only read data. INSERT, UPDATE, and DELETE
statements can have implicit queries as part of the statement. Queries include the
following kinds of statements:
SELECT
INSERT ... SELECT ... ;
UPDATE ... ;
DELETE ... ;
They do not include the following statement:
SELECT ... FOR UPDATE OF ... ;

The following characteristics are true of all queries that do not use the FOR UPDATE
clause:
■ A query acquires no data locks. Therefore, other transactions can query and
update a table being queried, including the specific rows being queried. Because
queries lacking FOR UPDATE clauses do not acquire any data locks to block other
operations, such queries are often referred to in Oracle as nonblocking queries.
■ A query does not have to wait for any data locks to be released; it can always
proceed. (Queries may have to wait for data locks in some very specific cases of
pending distributed transactions.)

查询时的锁
1. 查询不需要数据锁 , 不会阻塞任何操作
2. 不需要等待任何数据锁释放

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-991300/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    740
  • 访问量
    1899919