04 2014 档案

摘要:今天开发问我一个问题,PL/SQL很快出结果了,为什么应用还是很慢create index F_AGT_SAVB_ACCTINFO_H_idx4 on F_AGT_SAVB_ACCTINFO_H(agmt_id,last_trans_date,acct_bal,start_dt,end_dt,acc... 阅读全文
posted @ 2014-04-30 11:23 czcb 阅读(163) 评论(0) 推荐(0) 编辑
摘要:with aa as (select a.agmt_id, sum(c.acct_bal) as card_bal, --借记卡期末存款余额 a.card_open_org, a.OPEN_DATE, -- 发卡日期 ... 阅读全文
posted @ 2014-04-30 10:30 czcb 阅读(180) 评论(0) 推荐(0) 编辑
摘要:explain plan for with aa as (select a.agmt_id, sum(c.acct_bal) as card_bal, --借记卡期末存款余额 a.card_open_org, a.OPEN_DATE,... 阅读全文
posted @ 2014-04-28 16:08 czcb 阅读(201) 评论(0) 推荐(0) 编辑
摘要:[root@ywcrmdb ~]# fdisk -lDisk /dev/sda: 751.6 GB, 751619276800 bytes255 heads, 63 sectors/track, 91379 cylindersUnits = cylinders of 16065 * 512 = 82... 阅读全文
posted @ 2014-04-28 11:34 czcb 阅读(387) 评论(0) 推荐(0) 编辑
摘要:[root@localhost home]# su - cn0000rm: cannot remove `/home/cn0000/log/monitor_xmllog.20140417': Read-only file systemrm: cannot remove `/home/cn0000/l... 阅读全文
posted @ 2014-04-25 10:17 czcb 阅读(266) 评论(0) 推荐(0) 编辑
摘要:use mastergodump transaction MBFEWKDB with no_loggodump transaction MBFEHISDB with no_loggouse mastergodump database MBFEWKDB to 'MBFEWKDB.bak'gouse m... 阅读全文
posted @ 2014-04-25 09:42 czcb 阅读(717) 评论(0) 推荐(0) 编辑
摘要:SQL> select * from v$version where rownum=1;BANNER--------------------------------------------------------------------------------Oracle Database 11g ... 阅读全文
posted @ 2014-04-23 22:49 czcb 阅读(267) 评论(0) 推荐(0) 编辑
摘要:select a.username,(select count(*) from all_objects b where b.owner=a.username) cnt from all_users a;create table a as select * from all_users;create ... 阅读全文
posted @ 2014-04-22 11:21 czcb 阅读(387) 评论(0) 推荐(0) 编辑
摘要:select e.last_name, e.department_id, d.department_name from hr.employees e left outer join hr.departments d on (e.department_id = d.department_id); ... 阅读全文
posted @ 2014-04-22 09:02 czcb 阅读(335) 评论(0) 推荐(0) 编辑
摘要:SQL> begin for i in 1..1000000 loop execute immediate 'insert into p1 values(i)' ; commit; end loop;end; 2 3 4 5 6 7 8 /begin*ERROR at line 1:... 阅读全文
posted @ 2014-04-21 20:32 czcb 阅读(316) 评论(0) 推荐(0) 编辑
摘要:把XP下的字体C:\WINDOWS\FONTS\simsun.ttc(也就是宋体,大小为10M),把他重命名为simsun.ttf拷贝simsun.ttf字体到/usr/share/fonts/zh_CN/TrueType/下来在linux命令行下执行:fc-cache/usr/share/font... 阅读全文
posted @ 2014-04-21 16:40 czcb 阅读(345) 评论(0) 推荐(0) 编辑
摘要:生成目录: (1)Ctrl+End,到达文档的最后一页; (2)“插入”菜单——引用——索引和目录(此时出现索引和目录对话框); (3)单击“目录”选项卡 a、在“显示级别”中输入1-3中的任何数字 这个任何数字与你有几级标题有关,如果你设置了标题1、标... 阅读全文
posted @ 2014-04-21 09:51 czcb 阅读(146) 评论(0) 推荐(0) 编辑
摘要:[root@ywcrmdb ~]# sar -d 1 10Linux 2.6.32-220.el6.x86_64 (ywcrmdb) 2014年04月19日 _x86_64_(4 CPU)15时14分17秒 DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz aw... 阅读全文
posted @ 2014-04-19 15:18 czcb 阅读(367) 评论(0) 推荐(0) 编辑
摘要:linux如何安装yum使用YUM来安装软件,就可以不用去到处找依赖关系的RPM了。很方便。第一步:安装yum第二步:下载createrepo包并安装 下载地址:ftp://195.220.108.108/linux/dag/redhat/el4/en/i386/dag/RPMS/createre... 阅读全文
posted @ 2014-04-18 11:30 czcb 阅读(222) 评论(0) 推荐(0) 编辑
摘要:哈希连接(HASH JOIN)前文提到,嵌套循环只适合输出少量结果集。如果要返回大量结果集(比如返回100W数据),根据嵌套循环算法,被驱动表会扫描100W次,显然这是不对的。看到这里你应该明白为什么有些SQL优化了跑几秒,没优化跑几个小时甚至跑1天都不出结果。返回大量结果集适合走HASH JOIN... 阅读全文
posted @ 2014-04-16 22:19 czcb 阅读(752) 评论(0) 推荐(0) 编辑
摘要:SQL> col name format a30SQL> select * from (select SAMPLE_TIME, SESSION_ID, NAME, P1, P2, P3, ash.BLOCKING... 阅读全文
posted @ 2014-04-16 10:30 czcb 阅读(492) 评论(0) 推荐(0) 编辑
摘要:declarev_sql varchar2(200);beginloopv_sql :='select seq1.nextval from dual';execute immediate v_sql;end loop;end;SQL> select * from (select SAMPLE_TIM... 阅读全文
posted @ 2014-04-16 10:10 czcb 阅读(167) 评论(0) 推荐(0) 编辑
摘要:1 Z2 X3 U4 T5 G6 F7 C8 B9 A1 A2 B3 C4 DOracle的索引是以平衡树的方式组织存储的:保存的是索引列的值,以及该行的rowid的一部分(文件号,块号,行号) 下面我们通过例子来了解一下:1,create table test(id int,name varcha... 阅读全文
posted @ 2014-04-13 22:39 czcb 阅读(278) 评论(0) 推荐(0) 编辑
摘要:BLEVEL* NUMBER B*-Tree level: depth of the index from its root block to its leaf blocks. A depth of 0 indicates that the root block and leaf block ... 阅读全文
posted @ 2014-04-13 13:50 czcb 阅读(173) 评论(0) 推荐(0) 编辑
摘要:extent 上的块 物理上绝对连续多个连续的block组成一个extent不连续怎么多块读?Oracle 给表分配的单位是extent去做 全表扫描的时候 以块为单位,按照extent来读取(3) 段(TABLE、INDEX 等)由一个或多个区段组成。段在表空间中,但是可以包含这个表空间中多个数据... 阅读全文
posted @ 2014-04-12 19:16 czcb 阅读(357) 评论(0) 推荐(0) 编辑
摘要:select count(*) from SAVJ_ATOMJOURBAK where ((list_flag='1' and prt_flag='0') and acct_no notin (select acct_no from savb_basicinfo1 where ((card_n... 阅读全文
posted @ 2014-04-11 20:35 czcb 阅读(364) 评论(0) 推荐(0) 编辑
摘要:CHAIN_CNT:虽然行链接和行迁移的概念不同,但在ORACLE里其实不太分这个,CHAIN_CNT是总的数量PCTFREE:PCTFREE:为一个块保留的空间百分比,表示数据块在什么情况下可以被insert,默认是10,表示当数据块的可用空间低于10%后,就不可以被insert了,只能被用于up... 阅读全文
posted @ 2014-04-10 21:55 czcb 阅读(263) 评论(0) 推荐(0) 编辑
摘要:SQL> select * from (select SESSION_ID, NAME, P1, P2, P3, WAIT_TIME, CURRENT_OBJ#, CURRENT_FILE#, CURRE... 阅读全文
posted @ 2014-04-10 21:06 czcb 阅读(241) 评论(0) 推荐(0) 编辑
摘要:SQL> set linesize 200SQL> col name format a30SQL> select SESSION_ID,NAME,P1,P2,P3,WAIT_TIME,CURRENT_OBJ#,CURRENT_FILE#,CURRENT_BLOCK# from ... 阅读全文
posted @ 2014-04-10 15:45 czcb 阅读(272) 评论(0) 推荐(0) 编辑
摘要:explain plan for select /*+leading (T6) use_nl( T1 T6)*/ * from T_PM_ACCT_DTL_AF T1,(SELECT * FROM S_PM_MGR_DEPT_RELA ... 阅读全文
posted @ 2014-04-10 09:05 czcb 阅读(866) 评论(0) 推荐(0) 编辑
摘要:什么是buffer busy wait? A session that reads or modifies a buffer in the SGA must first acquire the cache buffers chains latch and traverse the bu... 阅读全文
posted @ 2014-04-09 19:48 czcb 阅读(372) 评论(0) 推荐(0) 编辑
摘要:SQL> set echo offset echo offset verify offset serveroutput onset feedback offset lines 200set pages 40col segment_name for a20 heading 'OBJECT_NAME'c... 阅读全文
posted @ 2014-04-08 09:30 czcb 阅读(223) 评论(0) 推荐(0) 编辑
摘要:11g v$session 新增PORT 字段 用于描述客户端的端口号客户机从10.5.129.180 访问10.5.128.28[oracle@cpool ~]$ netstat -na | grep 10.5.128.28tcp 0 0 10.5.129.180:3498... 阅读全文
posted @ 2014-04-08 09:00 czcb 阅读(328) 评论(0) 推荐(0) 编辑
摘要:SQL> select * from ROLE_SYS_PRIVS where ROLE='RESOURCE';ROLE PRIVILEGE ADM------------------------------ ---------------------------------... 阅读全文
posted @ 2014-04-03 10:08 czcb 阅读(188) 评论(0) 推荐(0) 编辑
摘要:对于最小化db file sequential read 事件所带来的影响,你可以做的另一件事情是减少AVERAGE_WAIT时间。这是会话必须等待从磁盘提取单块的平均时间,这些信息可以从v$session_event视图中得到。在较新的存储子系统中平均的单块读取事件不应该超过10ms。由于具有大量... 阅读全文
posted @ 2014-04-02 19:45 czcb 阅读(138) 评论(0) 推荐(0) 编辑
摘要:SQL> select * from v$mystat where rownum select /*+ parallel(t 4)*/ count(*),agmt_id fromF_AGT_COMR_INTDIST_H t group by agmt_id;出现9个进程SQL> select * f... 阅读全文
posted @ 2014-04-01 11:08 czcb 阅读(128) 评论(0) 推荐(0) 编辑