易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle deterministic关键字

http://inthirties.com:90/viewthread.jsp?tid=1395
这个deterministic是不是很眼熟呀,
我们在online redefinition里见到过这个关键字,这个关键在在自定义的函数索引里也出现了。
先看看文档
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.
要实现自己的函数,加入函数索引,必须加入这个deterministic关键字,保证你这行的返回是一个确定数。
否则出现
30553, 00000, “The function is not deterministic”
// *Cause: The function on which the index is defined is not
deterministic
// *Action: If the function is deterministic, mark it
DETERMINIS


相关文档:

Oracle分区(Partition)

项目中用到的partition,总结整理一下相关知识。(网上采集,如有侵权,请及时联系。)
 
一、Oracle分区简介
ORACLE的分区是一种处理超大型表、索引等的技术。分区是一种“分而治之”的技术,通过将大表和索引分成可以管理的小块,从而避免了对每个表作为一个大的、单独的对象进行管理,为大量数据提供 ......

Oracle 视图

Oracle 视图
    视图: 你可以通过创建表的视图来表现数据的逻辑子集或数据的组合.视图是基于表或者另一个
          视图的逻辑表,一个视图并不包含它自己的数据,它象一个窗口,通过该窗口可以查看或改变
         ......

Oracle 分页存储过程 几十万条记录

好长时间没写东东了,今天写了一个oracle的分页存储过程,贴出来与大家分享。
由于。net框架中的gridview等控件的分页功能太弱,所以大部分程序员都会自己写分页功能,而调用分页存储过程是必须的。
前台aspx页面不管是用下载的dll还是用自己写的用户控件,都能实现自己的功能,然而分页的存储过程就需要好好的考虑了,下 ......

oracle 在分组内排序的方法

oracle分析函数十分强大,我们只要掌握这些方法,更直接的说法就是知道这些分析函数的作用就能完成很多工作。
下边贴出这些函数,及简单应用。
其中我想对lag()和lead()函数坐下说明:lag()本身是延后的意思也就是延后出现某列的数,而lead()有引领、领先的意思也就是提前几行显示某列数据
RANK()
dense_rank() ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号