gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 21:58:18 24 4
gpt4 key购买 nike

在数据访问限制方面,Oracle 函数中的确定性并行启用子句有什么区别?

最佳答案

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 - Oracle 中函数的 DETERMINISTIC 和 PARALLEL_ENABLED 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17381444/

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