Specify DETERMINISTIC to indicate that the function returns the same result value whenever it is called with the same values for its arguments.
You must specify this keyword if you intend to call the function in the expression of a function-based index or from the query of a materialized view that is marked REFRESH FAST or ENABLE QUERY REWRITE. When Oracle Database encounters a deterministic function in one of these contexts, it attempts to use previously calculated results when possible rather than re-executing the function. If you subsequently change the semantics of the function, you must manually rebuild all dependent function-based indexes and materialized views.
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 will not be captured if Oracle Database chooses not to re-execute the function.
You must specify this keyword if you intend to call the function in the expression of a function-based index or from the query of a materialized view that is marked REFRESH FAST or ENABLE QUERY REWRITE. When Oracle Database encounters a deterministic function in one of these contexts, it attempts to use previously calculated results when possible rather than re-executing the function. If you subsequently change the semantics of the function, you must manually rebuild all dependent function-based indexes and materialized views.
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 will not be captured if Oracle Database chooses not to re-execute the function.
本文介绍了在Oracle数据库中如何使用确定性函数,这类函数在遇到相同输入时会返回相同的结果。文章强调了在创建基于函数的索引或快速刷新物化视图时指定确定性的重要性,并解释了如果后续更改函数语义,则需要手动重建所有依赖的索引和物化视图。
2069

被折叠的 条评论
为什么被折叠?



