Oracle 创建 Sequence
Fitness 胸
Fitness
2008金融危机 MBS、CDO、CDS
组合索引的引导列
组合索引的列顺序如何排列
select count(*) from t1,t2 where t1.id=t2.id and t1.owner='SCOTT';
这种sql,t2上建立(id)索引,t1上建立组合索引(owner,id)
尽量把join列放到组合索引最后面
INDEX FAST FULL SCAN
inx_id_ownerselect count(*) from t1,t2 where t1.id=t2.id and t1.owner='SCOTT';
INDEX RANGE SCAN
inx_owner_idselect count(*) from t1,t2 where t1.id=t2.id and t1.owner='SCOTT';
INDEX FULL SCAN
inx_id_ownerselect /*+ index(t1 inx_id_owner) */ count(*) from t1,t2 where t1.id=t2.id and t1.owner='SYS';
INDEX SKIP SCAN
inx_id_ownerselect /*+ index_ss(t1 inx_id_owner) */ count(*) from t1,t2 where t1.id=t2.id and t1.owner = 'SYS';