|
|
最初由 husthxd 发布
[B]
存储过程中的sql(dml)是串行的只是目前的情况把?
单机上的并行DML已经实现,那为何不能实现把DML分布到其他节点上执行?
存储可以是共享,那如果我们考虑不共享的情况呢?
存储共享基本上就只能有物理一个数据库.那如果不是存储共享而是有多个物理数据库呢? [/B]
存储过程中的SQL(dml)是串行的确实是目前的情况,你想随意改变这个情况的话,首先,你必须判断前后的 代码片段 是否有倚赖关系。然后,就我们经常说的多线程来说,这个程序设计还是人为的抽象出来的,或者os的超线程,也不是随便什么代码都能满足的。指望数据库能自动地判断是否具有依赖关系并 切分代码,实现多线程。我不知道什么时候能实现,暂时也看不出这个需求有多么地迫切。 更何况存储过程中往往很容易是一系列的需要顺序处理的代码。
如果你要考虑物理是不共享的,那暂时对于oracle来说就没必要讨论了,你可以去讨论 DB2 ,它不是共享的。
Restrictions on Parallel DML
The following are the restrictions for parallel DML in 9i Release 1. It has changed for 9i Release 2. Please look into the Data Warehousing Guide Chapter Parallel Execution for the latest information.
Update and delete operations are not parallelized on nonpartitioned tables.
For parallel update operations, global unique indexes are not supported. All other indexes are fully maintained by parallel operations.
A transaction can contain multiple parallel DML statements that modify different tables, but after a parallel DML statement modifies a table, no subsequent serial or parallel statement (DML or query) can access the same table again in that transaction.
This restriction also exists after a serial direct-path INSERT statement: no subsequent SQL statement (DML or query) can access the modified table during that transaction.
Queries that access the same table are allowed before a parallel DML or direct-path INSERT statement, but not after.
Any serial or parallel statements attempting to access a table that has already been modified by a parallel UPDATE, DELETE, or MERGE, or a direct-path INSERT during the same transaction are rejected with an error message.
This restriction also exists after a serial direct-load INSERT statement: no subsequent SQL statement (DML or query) can access the modified table
Queries that access the same table are allowed before a parallel DML or direct-load INSERT statement, but not after.
INSERT during the same transaction are rejected with an error message.
If initialization parameter ROW_LOCKING = INTENT, then inserts, updates, and deletes are not parallelized (regardless of the serializable mode).
Triggers are not supported for parallel DML operations.
Replication functionality is not supported for parallel DML.
Parallel DML cannot occur in the presence of certain constraints: self-referential integrity, delete cascade, and deferred integrity. In addition, for direct-path INSERT, there is no support for any referential integrity.
INSERT there is no support for any referential integrity.
Parallel DML cannot occur on tables with object columns or LOB columns, or on index-organized tables.
A transaction involved in a parallel DML operation cannot be or become a distributed transaction.
Clustered tables are not supported.>
Violations will cause the statement to execute serially without warnings or error messages (except for the restriction on statements accessing the same table in a transaction, which can cause error messages). For example, an update will be serialized if it requires global unique index maintenance. |
|