Oracle diary May4 2011

来源:互联网 发布:信息技术软件 编辑:程序博客网 时间:2024/09/21 09:04

Column order in index :

 

If you only use query as select id1,id2 from t, then index on (id1,id2) or on (id2,id1) are the same.

But if you also user select id1 from t sometime, then index on (id1,id2) is better than (id2,id1),vice versa.

 

BTW,  if there is a table t1 with primary key(id1,id2,id3), there will be no block on child talbe when update/delete parent table no matter your child table t2's fkey is (id1,id2,id3) or (id2,id3,id1).

原创粉丝点击