我的数据库里某个表TABLE已经有500万条记录
做了个模糊查询,速度很慢,想做个索引,怎么做。
select * from Noun where Noun_Mname like '%%'
Noun_Mname 字段上怎么建立索引,能不能速度变快点?
做了个模糊查询,速度很慢,想做个索引,怎么做。
select * from Noun where Noun_Mname like '%%'
Noun_Mname 字段上怎么建立索引,能不能速度变快点?
where charindex(Noun_Mname,'要查的字符')>0
IX_Noun_Noun_Mname
ON dbo.Noun
(
Noun_Mname
) WITH FILLFACTOR = 70 ON [PRIMARY]
GO
select * from Noun
where charindex('要查的字符',Noun_Mname)>0