happydba Rotating Header Image

10g的一个新花样:skip_unusable_indexes


关于skip_unusable_indexes这个参数,大家从它的名称就基本上可以理解它是做什么的,但在使用时需要注意一个小问题,非唯一索引在失效(unusable)状态是允许继续对表进行DML操作,但唯一索引在失效状态是不允许DML操作.

这个富有人性化的改进可以避免因为dba的失误而导致很多事务回退,当dba对表进行move操作时,如果表上没有唯一索引,那我们在move时,就不必担心事务回退,所以如果有些表如果insert/delete非重频繁的话,最好不要创建唯一索引.

10g中加强了对unusable索引的监控,如果你move了表,这时将会在alert日志中记录如下信息:Some indexes or index [sub]partitions of table SCOTT.DEPT have been marked unusable

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Powered by WP Hashcash

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin