WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606
全部博文(599)
发布时间:2013-01-04 12:39:59
最近频繁遇到个别程序执行计划走错的情况,导致程序频繁全表扫描,合适的索引用不到。通过设置参数optimizer_index_cost_adj为较小的值,可以使程序倾向于走索引扫描。但是在全局级别设置这个参数可能影响比较大。考虑到在程序级别设置这个参数,由于程序是用Pro*C写的,如果要在程序中设置的时候,需要在程序登陆到数据库中执行如下的SQL:EXEC SQL ALTER SESSION SET optimizer_index_cost_adj=50;这样需要改动大量的程序,而且还得重新编译,比较麻烦。其实还有更简单的解决方法,那就是采用登陆触发器。下面是一个简单的测试案例:首先创建登陆触发......【阅读全文】
发布时间:2012-12-29 21:09:07
By default RMAN has three types of compression : 1. Null Compression2. Unused Block Compression3. Binary CompressionTill Oracle Version 10.1 only 'Null' compression in done by default but from Oracle Version 10.2 'Null' and 'Unused Bloc'k Compression is done. T......【阅读全文】
发布时间:2012-12-28 10:04:53
Beginning with Oracle10G, when statistics are gathered for a table, the old statistics are retained so should there be any problem with performance of queries dependent on those statistics, the old ones can be restored.How long does Oracle retain the statistics for ? The default peri......【阅读全文】
发布时间:2012-12-27 16:02:02
如果我们的SQL采用了ROWNUM=1的查询方法,而且系统的CURSOR_SHARING设置了SIMILAR,那么我们很有可能遇到Bug 4513695。ORACLE并不承认这是个BUG,以下是ORACLE给出的解释: This is not really a bug as CURSOR_SHARING=SIMILAR does not give the optimizer all of the same information that EXACT would give it. However, it looks ......【阅读全文】
发布时间:2012-12-27 10:40:02
You cannot export any schema that contains dictionary metadata. This is a restriction of export process.Schemas that exclusively contain dictionary objects like SYS, CTXSYS, MDSYS and ORDSYS are never exported nor imported. This is because these schemas are created when you install the related......【阅读全文】