dbms_stats学习(zt)
分析表中的indexexecute dbms_stats.gather_table_stats(ownname => 'tab',tabname => 'HWM',method_opt =>'for all indexed columns size auto');分析指定列 buket 5 execute dbms_stats.gather_table_stat...
b-tree结构
B-Tree Index的结构浅探PHP code:B-Tree Index的结构浅探1 准备测试环境 ads3+10g 10.1.0.2SQL> create table t1(id number,name varchar2(32)); &nb...
cbo---db_file_multiblock_read_count
SQL> SELECT COUNT(*) FROM linyu.hwm;Execution Plan----------------------------------------------------------Plan hash value: 3274855064---------------------------------------------------------------...
HWM
ASSM管理模式下可以用 alter table hwm shrink space;回收高水位show_space脚本create or replace procedure show_space ( p_segname_1 in varchar2, p_space in varchar2 default 'MANUAL', p_type_1 in varchar2...
hint使用
在object_id上建有索引,使用第一个cost会很少这里虽然有索引,但是oracle并不知道索引中是否有null值,所以无法走索引指定not null后会去使用object_id这个索引select count(*) from hwm where object_id is not ...
trace
SQL> show parameter timed_statisticsNAME &nb...
Histograms
什么时候需要使用Histograms?如果表格内有20个column,其中最常被使用在查询的where条件句内的只有一个column A,另外有个column B很少被拿来做查询条件使用。现在你发现字段A和字段B的储存数据非常的skewed,就是...
shell脚本
#!/bin/bash#get archived log name and create reg_arc.sql #ftp upload archived log to standby #will create get_arc_name.tmp reg_name.sql reg_arc.sql three file#get the latest sequence number from stan...
使用s e d在文件中定位文本的方式
把一个文件里的文件传FTP.ftp -in <<EOFopen 10.0.0.1user uname passwd$(sed 's/^/mput /' ftpfile.txt)byeEOF 使用s e d在文件中定位文本的方式x x为一行号,如1x , y 表示行号范围从x到y,如2,5表示从...
dataguard环境apply redo log并failover:
dataguard环境apply redo log并failover:2008-05-21 14:34介绍:环境:redhat linux,Oracle 10.2.0.2,Max performance模拟的场景是primary库损坏,redo log还存在(通常redo会做冗余,如果没有了redo log就更...
linux下删除oracle
1.$ORACLE_BASE/product & oraInventory2./etc/oratab3./tmp/ora相关4./opt/orcl*5./usr/local/bin/下的几个文件可以不删除,但注意下次跑root.sh时,提示覆盖文件时选择y
移动index到另一个表空间
登入用户为需要移动的用户的indexspool aa.sql select 'alter index '||index_name||' rebuild tablespace rftyindex;' from user_indexes;spool off修改aa.sql得到alter index SYS_C0019159 rebuild tab...
linux 下忘记root密码(zt)
我們在Linux下不記得root的password怎么辦呢!看下面的說明启动机器时,会出现grub的菜单,用键盘的上下键移动到Redhat的启动项上,然后按e键,然后出现关于启动的几行,移动到类似如下的行:kernel /boot/vmlinuz...
get ddl
select dbms_metadata.get_ddl('TABLE','LINYU','SYS')FROM DUAL;
linux 安装
127.0.0.1 RFTY-A localhost.localdomain localhost安装的时候出现错误ping hostname看能不能通,不通是装不上的
oracle linux 配置X manager 与VNC
oracle linux 配置X manager 与VNC今天在oracle linux上配置了一下X manager 和vnc,是第一次配置vnc,vnc配置要比X manager简单许多这里记录一下:---- X manager 配置:1.修改GDM的配置文件,/etc/X11...
rollback segment
oracle可以从rollback segments中获得旧信息(旧数据管理者)这样支持了multi-version read consistency当查询开始后所要获得的数据就已经决定了.please note that a user who make change to his or her data can ...
parse
(1)execute to parse 太低,只有7%。eygle说过这个值为负或太低都说明shared pool设置不当或数据库性能不佳。并且给出了计算公式:100% * (1 - Parses/Executions) = Execute to Parse但是library hit 是 99.2%...
查看表大小
select * from dba_extents where segment_name='';查看一个表用了多少extentsselect * from dba_segments where segment_name='TBL_TIME';
vsftpd 500 OOPS: cannot change directory
setsebool -P ftpd_disable_trans 1永久解决 getsebool ftpd_disable_trans可以查看当前的状态如果不是on那么是输入命令 setsebool ftpd_disable_trans 1