- 浏览: 5183252 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
silence19841230:
先拿走看看
SpringBoot2.0开发WebSocket应用完整示例 -
wallimn:
masuweng 写道发下源码下载地址吧!三个相关文件打了个包 ...
SpringBoot2.0开发WebSocket应用完整示例 -
masuweng:
发下源码下载地址吧!
SpringBoot2.0开发WebSocket应用完整示例 -
masuweng:
SpringBoot2.0开发WebSocket应用完整示例 -
wallimn:
水淼火 写道你好,我使用以后,图标不显示,应该怎么引用呢,谢谢 ...
前端框架iviewui使用示例之菜单+多Tab页布局
转自:http://www.anbob.com/?p=820
今天学习物化视图,在Oracle9.2.0.0上遇到这个问题,但在9.2.0.8上没有这个问题。就上网查了查,又新掌握了点知识。
SQL> conn zwz
Enter password:
Connected.
SQL> desc testfun;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(38)
NAME VARCHAR2(22)
SQL> select * from testfun;
ID NAME
---------- ----------------------
1 anbob.com
2 anbob.com
3 weijar.com
SQL> create or replace function f_upp(p_name varchar2)
2 return varchar2
3is
4begin
5return upper(p_name);
6 end;
7 /
Function created.
SQL> create index idx_f_upp on testfun(f_upp(name));
create index idx_f_upp on testfun(f_upp(name))
*
ERROR at line 1:
ORA-30553: The function is not deterministic
SQL> create or replace function f_upp(p_name varchar2)
2 return varchar2 deterministic
3 begin
4 return upper(p_name);
5* end;
Warning: Function created with compilation errors.
SQL> show err
Errors for FUNCTION F_UPP:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/1 PLS-00103: Encountered the symbol "BEGIN" when expecting one of
the following:
; is authid as cluster order using external deterministic
parallel_enable pipelined aggregate
The symbol "is" was substituted for "BEGIN" to continue.
SQL>l2
2* return varchar2 deterministic
SQL> input is
SQL> l
1 create or replace function f_upp(p_name varchar2)
2 return varchar2 deterministic
3 is
4 begin
5 return upper(p_name);
6* end;
SQL> run
1 create or replace function f_upp(p_name varchar2)
2 return varchar2 deterministic
3 is
4 begin
5 return upper(p_name);
6* end;
Function created.
SQL> create index idx_f_upp on testfun(f_upp(name));
Index created..
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 reexecuting the function. If you subsequently change the semantics of the function, you must manually rebuild all dependent function-based indexes and materialized views.
这个关键字表明:如果你的函数当输入一样时,会返回同样的结果.
这样, 数据库就用前一个计算的值,而不需要再重新计算一次.
这对于使用函数索引等,会得到相当大的好处.
英文说明:
DETERMINISTIC Clause
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 reexecuting 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 reexecute the function.
The following semantic rules govern the use of the DETERMINISTIC clause:
You can declare a top-level subprogram DETERMINISTIC.
You can declare a package-level subprogram DETERMINISTIC in the package specification but not in the package body.
You cannot declare DETERMINISTIC a private subprogram (declared inside another subprogram or inside a package body).
A DETERMINISTIC subprogram can call another subprogram whether the called program is declared DETERMINISTIC or not.
今天学习物化视图,在Oracle9.2.0.0上遇到这个问题,但在9.2.0.8上没有这个问题。就上网查了查,又新掌握了点知识。
SQL> conn zwz
Enter password:
Connected.
SQL> desc testfun;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NUMBER(38)
NAME VARCHAR2(22)
SQL> select * from testfun;
ID NAME
---------- ----------------------
1 anbob.com
2 anbob.com
3 weijar.com
SQL> create or replace function f_upp(p_name varchar2)
2 return varchar2
3is
4begin
5return upper(p_name);
6 end;
7 /
Function created.
SQL> create index idx_f_upp on testfun(f_upp(name));
create index idx_f_upp on testfun(f_upp(name))
*
ERROR at line 1:
ORA-30553: The function is not deterministic
SQL> create or replace function f_upp(p_name varchar2)
2 return varchar2 deterministic
3 begin
4 return upper(p_name);
5* end;
Warning: Function created with compilation errors.
SQL> show err
Errors for FUNCTION F_UPP:
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/1 PLS-00103: Encountered the symbol "BEGIN" when expecting one of
the following:
; is authid as cluster order using external deterministic
parallel_enable pipelined aggregate
The symbol "is" was substituted for "BEGIN" to continue.
SQL>l2
2* return varchar2 deterministic
SQL> input is
SQL> l
1 create or replace function f_upp(p_name varchar2)
2 return varchar2 deterministic
3 is
4 begin
5 return upper(p_name);
6* end;
SQL> run
1 create or replace function f_upp(p_name varchar2)
2 return varchar2 deterministic
3 is
4 begin
5 return upper(p_name);
6* end;
Function created.
SQL> create index idx_f_upp on testfun(f_upp(name));
Index created..
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 reexecuting the function. If you subsequently change the semantics of the function, you must manually rebuild all dependent function-based indexes and materialized views.
这个关键字表明:如果你的函数当输入一样时,会返回同样的结果.
这样, 数据库就用前一个计算的值,而不需要再重新计算一次.
这对于使用函数索引等,会得到相当大的好处.
英文说明:
DETERMINISTIC Clause
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 reexecuting 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 reexecute the function.
The following semantic rules govern the use of the DETERMINISTIC clause:
You can declare a top-level subprogram DETERMINISTIC.
You can declare a package-level subprogram DETERMINISTIC in the package specification but not in the package body.
You cannot declare DETERMINISTIC a private subprogram (declared inside another subprogram or inside a package body).
A DETERMINISTIC subprogram can call another subprogram whether the called program is declared DETERMINISTIC or not.
发表评论
-
Oracle连接故障的排除
2024-09-09 22:33 919Oracle版本为11G,操作系统为Windows Ser ... -
Oracle数据库相关系统突然提示“SQLException:违反协议”
2024-02-19 15:50 5506SQLException:违反协议这个异常可能由很多的 ... -
CentOS在Docker中安装Oracle
2024-02-06 12:13 13381.拉取Oracle镜像,并检 ... -
Windows Server安装oracle数据库一直停在82%
2023-02-04 12:01 653网上有个说法:服务器超过一定数量的CPU后,将不能正常安装 ... -
ORA-04030错误处理
2023-02-04 11:52 2746【错误描述】 错误信息如下: ORA-04030:在尝 ... -
ORA-04030错误处理
2023-02-04 11:45 403【错误描述】 错误信息如下: ORA-04030:在尝 ... -
Linux安装MySQL数据库
2019-06-10 22:27 18571.进入安装包所在目录,解压: tar zxvf mysql- ... -
确定MySQL在Linux系统中配置文件的位置
2019-04-14 19:30 28011.通过which mysql命令来查看mysql的安装位置。 ... -
mysql set names 命令和 mysql 字符编码问题
2019-04-12 00:34 1181转自:https://www.cnblogs.com/digd ... -
MYSQL中取当前周/月/季/年的第一天与最后一天
2018-11-17 23:16 2239转自:https://blog.csdn.net/ ... -
Oracle删除大量数据的实践
2016-11-07 18:03 5868一、引言 从来没有 ... -
Oracle 数据库简明教程 V0.1
2016-03-23 21:01 2090供初学者入门学习使用,以开发者常见、常用的知识为主,基本上 ... -
Oracle拆分字符串函数
2016-03-23 10:58 3395create or replace type string ... -
Oracle数据库远程连接无响应
2016-03-21 10:20 4354故障现象: 服务器本机使用sqlplus / as s ... -
Oracle PGA详解
2015-10-21 15:34 11512转自:http://yanguz123.iteye.com/b ... -
Oracle12C导入dmp数据
2015-10-08 23:43 20577Oracle12C,发生了较大的变化。以前熟悉的东西变得陌 ... -
SQLLDR数据导入小结
2015-07-25 22:06 75721.创建数据表 CREATE TABLE ... -
Window7安装Oracle10
2015-03-06 12:14 1642每次安装都要百度,转到自己的博客上,找起来方便,还能增加访 ... -
Oracle SQL Developer 连接 Mysql 数据库
2015-02-25 19:36 3706下载JDBC包,解压缩这里只要mysql-connector- ... -
Mysql数据备份与恢复
2015-02-25 19:15 1385备份/恢复策略 1. 要定期做 mysql备份,并考虑系统可以 ...
相关推荐
在Oracle中,虽然没有内置的直接转换函数来实现这一功能,但可以通过自定义函数或者利用现有的开源存储过程来实现这一转换。下面我们将详细介绍如何在Oracle中进行阳历到农历的转换。 首先,我们需要理解阳历和农历...
这里收录了多种数据库管理系统中的保留字,包括DB2、Oracle、MySQL、SQL Server等。这些保留字是数据库管理系统中不可或缺的一部分,理解和熟悉这些保留字对数据库的设计、开发和管理至关重要。 DB2保留字 DB2是...
### IEEE 802.11s - Mesh Deterministic Access (MDA) #### 概述 IEEE 802.11s标准是一项为无线局域网(WLAN)提供透明广播域支持的协议,其核心特性之一是Mesh Deterministic Access(MDA),即确定性网格访问...
文档中反复提及的“Deterministic”一词,意味着测试过程中的行为是可以预测和一致的,这对于确保USB PD设备之间的兼容性和可靠性至关重要。由于USB PD技术在不同设备和应用场景中发挥着重要作用,因此对设备的合规...
在Oracle数据库中,XML DB 是一种用于存储、查询和管理 XML 数据的强大工具。为了开始使用这一功能,首先需要完成 XML DB 的安装。 ##### 1.1 通过DBCA安装 **DBCA(Database Configuration Assistant)** 是 ...
在OpenAI的gym环境中,利用深度强化学习的DDPG算法实现立杆子的小游戏仿真,验证算法的效果,加有注释适合初学者,同时可以适应tensorflow2.x版本运行
MySQL中的“DETERMINISTIC”标识符是用来定义存储过程或函数的一个特性,它表示该函数在相同的输入参数下总是返回相同的结果。当你尝试创建或修改一个存储过程,并且MySQL服务器启用了二进制日志(binlog)功能,...
可以通过多种方式将空间数据导入到 Oracle Spatial 数据库中,包括使用 SQL*Loader 或者通过 OGC Web 服务接口等。 **4. 基于 SDO_GEOMETRY 的 ST_GEOMETRY** 尽管 `SDO_GEOMETRY` 是 Oracle Spatial 的核心几何...
在标题中提到的问题是关于函数声明的特性,特别是`DETERMINISTIC`、`NO SQL`和`READS SQL DATA`这些关键字的缺失,以及在启用二进制日志记录(Binary Logging)时可能遇到的安全问题。 首先,我们来解释一下这些...
在Oracle数据库中,为了优化大型数据表的查询性能和管理效率,可以采用分区技术。分区是一种将大表逻辑上划分为较小、更易管理的部分的方法。对于时间序列数据,如交易记录、日志数据等,按月分区尤其常见,因为这...
该书的PDF版本(0 BOOK Network Caculus A Theory of Deterministic Queuing Systems for the Internet v4.pdf)应该包含了详细的概念阐述、数学推导和实例分析,是网络工程领域的重要参考资料。
标题中的"DOA估计 - DML(deterministic Maximum Likelihood) & SML(stochastic Maximum Likelihood)"是指在信号处理领域中的方向-of-arrival (DOA)估计算法,这两种方法都是用于确定多天线接收系统中多个信号源的...
在句法分析中,确定性解析(deterministic parsing)提供了一种与概率性解析(probabilistic parsing)不同的方法。在概率性解析中,模型会为句子中的每一种可能的解析树分配概率,使用动态规划、束搜索(beam-...
在强化学习领域,确定性策略梯度算法(Deterministic Policy Gradient Algorithms,DPG)的出现为连续动作空间问题提供了一个崭新的解决思路。与传统的随机策略不同,确定性策略梯度算法不再随机地选择动作,而是...
尤其值得称赞的是,对于一个问题,书中都会给出各种解法,然后分析各种解法的优劣,如果算法没有达到预期的结果,会分析是什么导致了错误的结果。 希望这本书能帮助大家学习。 由于本人能力有限,不能上传大于20MB的...
而Oracle研究,顾名思义,就像是数据库中的Oracle数据库一样,是一种技术手段,用于提供问题解决方案的最优解和最差解,帮助研究者对研究问题进行全面的评估。 文章中提到的三种取指策略各自有着不同的特点和应用...
这个程序是把正则表达式用图形的方式表达出来。用户输入一个正则表达式,程序会自动为这个正则表达式画出相应的图形来。 这个程序的正则表达式支持所有的字母 “*”符号表示循环。 含有数字的正则表达式是不合法的。
然而,在创建自定义函数时,可能会遇到一些问题,比如“此函数在声明中没有DETERMINISTIC、NO SQL或READS SQL DATA,并且二进制日志已启用”的错误。本文将深入探讨这个错误的原因以及如何解决它。 首先,让我们...
概率论排队论确定性模型Deterministic model和例题