set statistics time on
select top 20000
tb_article.id,tb_article.title,tb_article.categoryid,
tb_category.id ,tb_category.cname
from tb_article,tb_category
where tb_article.categoryid=tb_category.id and
tb_article.title like'%多%'
set statistics time on
select top 20000
tb_article.id,tb_article.title,tb_article.categoryid,
tb_category.id ,tb_category.cname
from tb_article inner join tb_category
on tb_article.categoryid=tb_category.id
where tb_article.title like'%多%'
站长苏飞 发表于 2015-3-16 12:43
tb_article.title like'%多%' 我感觉关键是这个慢,Like是很慢的,这个除非你建全文索引会快一些
lyg1112 发表于 2015-4-22 13:15
全文索引怎么建, 如果在视图中要怎么弄?
站长苏飞 发表于 2015-4-22 13:22
右建就看到了,具体方法根据提示来吧,或者事先查下百度
lyg1112 发表于 2015-4-22 13:30
右键去定义的话显示没有可用的唯一索引,百了下 说视图中本来没有数据的 说了些什么实物话之类之类的好 ...
欢迎光临 苏飞论坛 (http://www.sufeinet.com/) | Powered by Discuz! X3.4 |