2011年8月5日

组合索引怎么应该怎么选取引导列?

摘要: 有这样一个SQL select count(*) from t1,t2 where t1.id=t2.id and t1.owner='SCOTT'; id列选择性很高,owner选择性很低 要优化它很简单,只需要在t1表上建立一个组合索引(owner,id),在t2表上建立一个索引(id) ... 阅读全文

posted @ 2011-08-05 16:14 如果蜗牛有爱情 阅读(319) 评论(0) 推荐(0) 编辑

导航