暂无图片
返回数说广场
brucewoo
2025-03-13
对于下面的查询SQL,以下哪个索引创建方法对于改善该SQL的性能有最大的帮助? select * from (select * from t1 where type='10' order by create_time desc) where rownum<=10; 补充说明:表T1约有10万行记录,TYPE列上有15个唯一值,CREATE_TIME列上有约10万个唯一值。 create index ind_t1_test on t1(type,create_time); 有等值过滤条件和排序条件,且返回前N行的查询,需要在等值过滤条件和排序列上创建组合索引,且等值过滤条件在前。因此,create index ind_t1_test on t1(type,create_time);这样创建索引,会取得最好的效果。
0
暂无图片 0
52
分享

评论

热门数说