gpt4 book ai didi

oracle - DETERMINISTIC 和 PARALLEL_ENABLED 与 Oracle 中函数的区别

转载 作者:行者123 更新时间:2023-12-02 04:59:19 25 4
gpt4 key购买 nike

Oracle 函数中的deterministicparallel enable 子句 在数据访问限制方面有什么区别?

最佳答案

documentation on the CREATE FUNCTION statement 中所述:

DETERMINISTIC

Indicates that the function returns the same result value whenever it is called with the same values for its parameters.

...

Do not specify this clause to define a function that uses package variables or that accesses the database in any way that might affect the return result of the function. The results of doing so are not captured if the database chooses not to reexecute the function.

parallel_enable_clause

Indicates that the function can run from a parallel execution server of a parallel query operation. The function must not use session state, such as package variables, as those variables are not necessarily shared among the parallel execution servers.

...

  • The optional streaming_clause lets you order or cluster the parallel processing by a specified column list.

    • ORDER BY indicates that the rows on a parallel execution server must be locally ordered.

    • CLUSTER BY indicates that the rows on a parallel execution server must have the same key values as specified by the column_list.

这是两个完全不同的选项,如果您需要,应该使用它们。区别是绝对的,无论可能存在什么限制,因为它们不是一回事。

关于oracle - DETERMINISTIC 和 PARALLEL_ENABLED 与 Oracle 中函数的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17381444/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com