今天在ITPUB看到一个帖子,关于WHERE条件的执行顺序的。http://www.itpub.net/thread-1755665-1-1.html原文如下:今天看到以下一句话,我记得以下的描述应该是针对RBO的吧,现在CBO优化器应该能自己判断了吧?ORACLE采用自下而上的顺序解析WHERE子句,根据这个原理,表之间的连接必须写在其他WHERE条件之前,那些可以过滤掉最大数量记录的条件必须写在WHERE子句的末尾。事实正好相反,可以过滤掉最大数量记录的条件必须写在WHERE子句的前面。看下面一个经典例子:SQL> desc x 名称  【阅读全文】
可以设置10513事件来临时禁止SMON恢复死事务,这在我们做某些异常恢复的时候显得异常有效,当然不建议在一个正常的生产环境中设置这个事件:SQL> alter system set events '10513 trace name context forever, level 2';System altered.10531 -- event disables transaction recovery which was initiated by SMONSQL> select ktuxeusn, 2 to_char(sysdate, 'DD-MON-YYYY H【阅读全文】
最直观,最原始1.select 'drop table'||table_name||' purge;' from all_tables where owner='U1';这里一定要注意加上后面的purge,否责会放到当前用户的回收站中,在查看名字被一串组合字符串替代show recyclepurge recyclebin方便快捷2.declarecursor job1 is select table_name from all_tables where owner='U1';beginfor job2 in job1 loopexecute immediate 'drop table u1.'【阅读全文】
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【阅读全文】
可以设置10513事件来临时禁止SMON恢复死事务,这在我们做某些异常恢复的时候显得异常有效,当然不建议在一个正常的生产环境中设置这个事件:
SQL> alter system set events '10513
trace name context forever, level 2';
System altered.
10531 -- event disables transaction
recovery which was initiated by SMON
SQL> select ktux【阅读全文】