易截截图软件、单文件、免安装、纯绿色、仅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重建索引

郑重说明:此文来自于网络,如有侵权请告之!
导读:
  重建索引有多种方式,如drop and re-create、rebuild、rebuild online等。下面简单比较这几种方式异同以及优缺点:
  首先建立测试表及数据:
  SQL> CREATE TABLE TEST AS SELECT CITYCODE C1 from CITIZENINFO2;
  Table created
  SQL> ALTE ......

oracle 在分组内排序的方法

oracle分析函数十分强大,我们只要掌握这些方法,更直接的说法就是知道这些分析函数的作用就能完成很多工作。
下边贴出这些函数,及简单应用。
其中我想对lag()和lead()函数坐下说明:lag()本身是延后的意思也就是延后出现某列的数,而lead()有引领、领先的意思也就是提前几行显示某列数据
RANK()
dense_rank() ......

Oracle索引、视图、sqlplus基础、分区表

索引
 索引的目的是提高存储数据页面的速度
 服务器扫描索引以获得数据存储单元的地址
 索引的优点为:提高查询的执行速度、实施数据的唯一性、加速了表之间的连接
 索引的缺点为:创建索引需要花费较多的时间、每个创建的索引连同原先的数据源都需要空间来存储数据、每次修改数据时索引都要更新
......

Oracle函数

函数:
 字符函数 
  转化成小写LOWER(<C>)  转化成大写UPPER(<C>) select lower('aAbBcC') from dual;
 
 --------
 日期函数
  add_months(D,<I>)返回日期D加上i个月后的结果
   select add_month(sysdate,3)from dual;
&nb ......

Legato备份oracle的文档整理

http://inthirties.com:90/viewthread.jsp?tid=1394
1 我们已经在备份服务器上建立了一个catalog库,具体的操作过程如下:
1)查询现在的数据库
# sqlplus /nolog.
SQL>connect / as sysdba;
Connected.
SQL>select * from v$tablespace;
TS# NAME INC
———- ————& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号