PL/SQL 中的并行性
我如何在 pl-sql- 中并行运行一个查询?
我需要所有的流量...
how can i run one query in pl-sql- in parallel?
i need all the flow...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我如何在 pl-sql- 中并行运行一个查询?
我需要所有的流量...
how can i run one query in pl-sql- in parallel?
i need all the flow...
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您可以创建作业以便并行运行相同的查询。
示例
说明
请假设您的 Oracle 数据库中有一个存储过程,其名称如下:
stored_procedure_for_deletion
如果您希望使用 PARALLELISM 多次执行该存储过程,则必须创建一个名为“TARGET_DELETION”的存储过程(如上所示) ),这会创建一个新作业,该作业使用 PL/SQL 块调用:
beginstored_procedure_for_deletion;结尾;
...执行名为“stored_procedure_for_deletion”的过程。
该作业会立即启动,因此您可以连续多次运行存储过程 target_deletion,以便以并行方式运行相同的过程。
You can create JOBs in order to run the same query with parallelism.
EXAMPLE
EXPLAINATION
Please suppose you have, in your Oracle DataBase, a stored procedure called exactly as follows:
stored_procedure_for_deletion
If you wish to execute that stored procedure many times with PARALLELISM, you have to create a stored procedure called for example "TARGET_DELETION" (written above), which creates a new job that invokes, with the PL/SQL block:
begin stored_procedure_for_deletion; end;
... the execution of your procedure called "stored_procedure_for_deletion".
The job starts immediately, so you can run the stored procedure target_deletion many consecutive times, in order to run the same procedure with parallelism.
如果在实例级别启用,Oracle 本身具有并行查询功能:
http://www.orafaq.com/wiki /Parallel_Query_FAQ
编辑:不清楚您要做什么。也许您想要异步查询执行,因此Oracle作业建议是正确的(请参阅其他答案)。
Oracle并行特性不是异步的,它只是说优化器在查询执行时使用一定数量的CPU,以加速结果。例如:
以 4 级并行度执行查询。
If enabled at instance level, Oracle itself has parallel query features:
http://www.orafaq.com/wiki/Parallel_Query_FAQ
edit: it's not clear what you are trying to do. Maybe you want asynchronous query execution, so the Oracle job suggestion is correct (see the other answer).
Oracle parallel feature is not asynchronous, it just says the optimizer to use a certain number of CPUs in query execution, to speed up the result. For example:
executes your query with parallelism at degree 4.