关于外连接的一个实验(先过滤后连接,先连接后过滤)
[@more@]Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 Connected as mr========建立测试表WT1,WT2SQL> drop TABLE wt1;Table droppedSQL> drop TABLE wt2;Table droppedSQL> create TABLE wt1(x NUMBER, y NUMBER);Table createdSQL> SQL> INSERT INTO wt1 SELECT 1,11 from dual;1 row insertedSQL> INSERT INTO wt1 SELECT 2,22 from dual;1 row insertedSQL> commit;Commit completeSQL> create TABLE wt2(x NUMber,y NUMBER ,z NUMBER);Table createdSQL> SQL> INSERT IN
oracle 11gR2 advanced compress table
默认oracle建立表的时候是nocompress,compress for all operations 和 compress for direct_load operations都是11g以前的选项为了兼容以前而存在的。11g以后实际的压缩选项只有compress [basic]和compress for oltp两种,其他的query等是基于硬件的选项.{ COMPRESS [ BASIC | FOR { OLTP| { QUERY | ARCHIVE } [ LOW | HIGH ]}]| NOCOMPRESS }Compression can occur while data is being inserted, updated, or bulk loaded into a table. Operations that permit compression include:Single-row or array inserts and updatesThe foll
unix profile idletime
参考文章 Script for killing sniped sessions shadow processes [ID 96170.1]创建 idletime的profile,并修改用户的profile。例:alter system set resource_limit = true; create profile idletime limit idle_time 120; alter user scott profile idletime;当设定了如上的profile时,查询 v$session 视图,过了idletime后的session status 列标示为'sniped' 的。pmon 不会清除 sniped 的进程,使用'alter system kill session' 杀掉session但session status 标示为 killed ,最终不会清除超过idletime的session。 需要单独写个脚本利
oracle internal 研究的相关网址
http://www.ixora.com.au/http://www.jlcomp.demon.co.uk/http://blog.tanelpoder.comhttp://www.juliandyke.comhttp://www.dbazine.com/oracle/ora-articles/http://www.oaktable.net/articleshttp://blog.tanelpoder.com/?s=systemstatehttp://www.pythian.com/news/[@more@]
oracle11g 建表特性带来的误解
测试服务器:11.2.0.1测试客户端:10.2.0.1 sqlplus现象:建表之后,初始不会分配segment,造成dba_tables有表信息,而 dba_segments 没有信息。SQL> create tablespace tbs2 datafile 'tbs01.dbf'3 size 1m;表空间已创建。SQL> create table cui (id number) tablespace tbs;表已创建。SQL> select table_name from user_tables where tablespace_name='TBS';TABLE_NAME ------------------------------ CUI SQL> select segment_name from user_SEGMENTS where tablespace_name='TBS';未选定行SQL> drop tablespace tbs
x$kglob/x$kgltr 中library cache信息查看(结果同dump内容)
Kgl 解释 kernel layer generic layer library cache manager 以下两个表的说明可以先简单看下,然后看完这节内容之后再回过头来看下。X$kglob 表说明如下:Kglhdadr (children address) LIBRARY OBJECT HANDLE: handleKglhdpar (parent address) LIBRARY OBJECT HANDLE:handle Kglnaown 依赖object的owner nameKglnahsh sql的hash value (v$sql 中的hash_value)Kglnahsv sql 的hash value (长串格式:9a5fb5d584eb42ce5f55b9c92930cf55)Kglhdobj LIBRARY OBJECT: objectKglobhd0 data#=0 的 heap 地址Kglobhd1Kglobhd2Kglobhd3..7Kgl