易截截图软件、单文件、免安装、纯绿色、仅160KB

Oracle wait problems and potential solutions

Wait Problem Potential Fix Sequential Read Indicates many index reads—tune the code (especially joins) Scattered Read Indicates many full table scans—tune the code; cache small tables Free Buffer Increase the DB_CACHE_SIZE; shorten the checkpoint; tune
the code Buffer Busy Segment header—add freelists or freelist groups Buffer Busy Data block—separate “hot” data; use reverse key indexes; use
smaller blocks; increase initrans (debatable); reduce block
popularity; make I/O faster Buffer Busy Undo header—add rollback segments or areas Buffer Busy Undo block—commit more; larger rollback segments or areas Latch Free Investigate the detail (a listing later in this chapter includes fixes) Enqueue – ST Use LMTs or preallocate large extents Enqueue – HW Preallocate extents above the high water mark Enqueue – TX4 Increase initrans or use a smaller block size on the table or index Enqueue – TX6 Fix the code that is making the block unsharable (use v$lock to find) Enqueue – TM Index foreign keys; check application locking of tables Log Buffer Space Increase the log buffer; use faster disks for the redo logs Log File Switch Archive destination slow or full; add more or larger redo logs Log file sync Commit more records at a time; use faster redo log disks; use
raw devices Write complete waits Add database writers; checkpoint more often; buffer cache too small


相关文档:

oracle日期函数集锦


一、 常用日期数据格式
1.Y或YY或YYY 年的最后一位,两位或三位
SQL> Select to_char(sysdate,'Y') from dual;
TO_CHAR(SYSDATE,'Y')
--------------------
7
SQL> Select to_char(sysdate,'YY') from dual;
TO_CHAR(SYSDATE,'YY')
---------------------
07
SQL> Select to_char(sysdate,'YYY') from ......

Oracle的优化器有两种优化方式(二)

15. /*+USE_CONCAT*/
对查询中的WHERE后面的OR条件进行转换为UNION  ALL的组合查询. (懵懂啊,先存着)
例如:
select /*+use_concat */ * from emp where deptno=10 OR empno=7788;
Execution Plan
----------------------------------------------------------
   0      S ......

oracle更改字符集

修改oracle 10g的字符集
修改数据库字符集为:ZHS16GBK
首先用scott&tiger&orcl登录到sql/plus
查看服务器端字符集
SQL > select * from
V$NLS_PARAMETERS;
修改:
$sqlplus /nolog
SQL>conn / as sysdba

此时数据库服务器已启动,则先执行 SHUTDOWN IMMEDIATE 命
令关闭数据库服务器,然后执 ......

oracle经验之ANY,SOME,ALL区别


因为很少用到, 所以几乎忘记了这几个函数, 不过它们还是很有用的使用它们可以大大简化一些SQL文的语法, 至于效率问题, 如CCW所说它们和EXISTS, IN 之类没有什么差别, 而且要具体问题具体分析
其中ANY和SOME在意思上是相同的, 可以相互替代.
举几个例子来说明ALL和ANY的用法
1. SELECT * from TABLEA WHERE FLD > AL ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号