oracle sleep function
sys.dbms_lock.sleep(0.5); 0.5---s
trace lsnrctl
strace lsnrtcl start this command will help to trace failure reason.
oracle character set
-- 3.5 字符集的更改 ( P94 )-- 数据库创建以后,如果需要修改字符集,通常需要重建数据库,通过导入导出的方式来转换。也可以通过以下方式更改:ALTER DATABASE CHARACTER SET -- 注意修改数据库字符集时必须...
dbms_advance_rewrite
dbms_advance_rewrite来workround原始sql:select /*+ opt_param('query_rewrite_integrit','trusted') */ * from t_or where object_id is null or object_name='aa'SCOTT@oracle11g>create table t_or as select ob...
min max and page
棉花糖ONE 2009年03月11日 19:57 阅读(51) 评论(1) 分类:个人日记 权限: 公开 字体:大▼ 小 中 大 更多▼ 设置置顶 权限设置 推荐日志 转为私密日志 删除编辑1.最大值和最小值,如果从索引结构上来看,无非就是从roo...
oracle script and tool
http://tech.e2sn.com/oracle-scripts-and-tools
function of sql
将函数解开,你这sql调用了太多的函数,所以会慢。建议:1.如果是11g的话启用函数缓存,这样对于相同的输入参数,返回值如果一样的话,只需计算一次。2.如果无法使用1.,就将函数解开,你这个写代码的人是受到java编...
workarea_size_policy
alter session set workarea_size_policy=manual;alter session set sort_area_size = 尽量大一点的值
disable cartisian
alter session set "_optimizer_mjc_enabled" = false;
count, max, dense_rank
select orderid, canclestate, reportstatusfrom(select orderid, &nb...
contains and like '%abc%'
scott@ORCL> CREATE UNIQUE INDEX SCOTT.I_DEPT_DEPTNO_DNAME ON SCOTT.DEPT 2 ( DNAME);Index created.scott@ORCL> Analyze Table SCOTT.DEPT Compute Statistics ;Table analyzed.scott@ORC...
execution plan
select * from table(dbms_xplan.display_cursor(null,null,'iostats last')); (I/O) SELECT * FROM table(dbms_xplan.display_cursor(NULL, NULL, 'memstats last'));(PGA)
hint no_unnest, push_subq, push_pred
http://space.itpub.net/15415488/viewspace-663969 http://www.itpub.net/thread-1391316-1-1.html swap_join_inputs USE_CONCAT)u"B+~rz J22936840The USE_CONCAT hint forces combined OR c...
index about null
about sql : select * from user_table object_id is null; even though there is index about object_id , execution plan can not invoke index. now you can create index text_id on user_t...
track somebody do in oracle
create table sys.audit_tracefile (logontime date, sid number, ins_id num...
semi join and anti join
http://www.dbafree.net/?p=224
consistent gets and db block gets
http://mwidlake.wordpress.com/2009/06/02/what-are-consistent-gets/ http://jonathanlewis.wordpress.com/2009/06/12/consistent-gets-2/
hint gather_plan_statistics AND cardinality
hint gather_plan_statistics AND cardinalitydbms_xplan.display_cursor('sqlid', 0,'ALL IOSTATS LAST')
v$session
V$SESSION中的连接列Column &nb...
v$mystat, v$statname
v$mystat by which we can select current session id and performance consume. v$sessstat is for sessions sid of instance v$sysstat is for all session of database. v$sta...