sql语句优化 table1有字段 name,password,emailselect * from table1 t where substr(t.name,1,4)= 'mitt'; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from table1 t where t.name LIKE 'mitt%';给name创建index:create index i_name on table1 (name); 用不用把* 列成name,password,email 常用的话建个substr(t.name,1,4)的索引列 select * from table1 t where t.name LIKE 'mitt%';给name创建index:create index i_name on table1 (name); 1楼正解,能不用函数的,就不用函数,如果在name列有索引,使用函数将不会使用name列的索引,而走全表扫描,即使没有索引,执行substr函数也不需要。 select * from table1 t where t.name like 'mitt%';优化效果不明显,测试select count(*) from table1 t where substr(t.name,1,4)= 'mitt'; --2.08select count(*) from table1 t where t.name like 'mitt%'; --1.57300w数据量,再想别的 Oracle授权给用户问题 求教下 怎么制定索引列 oracle查询 我在Imp数据的时候,当跑到准备启用约束的时候,就挂死了,清高手指点 求SQL写法 关于备份的一个问题。急。。。 ora-12541没有监听器,急急急!!!! 大数据量问题! 一个小问题 再次请问!!!ORA-06571: 函数TEST_3不能保证不更新数据库???? 请高手们帮看一下这个ORACLE查询语句的写法. 声明定义绑定变量之后,怎么用这些绑定变量呢?
给name创建index:create index i_name on table1 (name);
name,password,email
substr(t.name,1,4)的索引列
给name创建index:create index i_name on table1 (name);
优化效果不明显,
测试
select count(*) from table1 t where substr(t.name,1,4)= 'mitt'; --2.08
select count(*) from table1 t where t.name like 'mitt%'; --1.57
300w数据量,再想别的