会 员 登 录
热 门 文 章
相 关 文 章
- 没有文章
Tags(标签)
SqlServer版用户如何使用全文索引,进行优化网站搜索
若干数据量大,启用全文搜索是非常必要的,不然游客在搜索软件或者文章的介绍的时候数据库负担非常重,基本上都会执行超时。
下面介绍一下使用全文搜索
execute sp_fulltext_database 'enable'
下面介绍一下使用全文搜索
execute sp_fulltext_database 'enable'
---建立全文检索目录ft_test
execute sp_fulltext_catalog 'ft_winner2050', 'create'
execute sp_fulltext_catalog 'ft_winner2050', 'create'
--为SoftName列建立全文索引数据元,PK_Soft为TopWinCMS_Soft表中由主键所建立的唯一索引,这个参数是必需的。
execute sp_fulltext_table 'TopWinCMS_Article','create', 'ft_winner2050','PK_TopWinCMS_Article'
execute sp_fulltext_table 'TopWinCMS_Article','create', 'ft_winner2050','PK_TopWinCMS_Article'
--设置全文索引列名
execute sp_fulltext_column 'TopWinCMS_Article','Title', 'add'
execute sp_fulltext_column 'TopWinCMS_Article','Content', 'add'
execute sp_fulltext_column 'TopWinCMS_Article','Title', 'add'
execute sp_fulltext_column 'TopWinCMS_Article','Content', 'add'
--建立全文索引
execute sp_fulltext_table 'TopWinCMS_Article', 'activate'
execute sp_fulltext_table 'TopWinCMS_Article', 'activate'
--填充全文索引目录
execute sp_fulltext_catalog 'ft_winner2050', 'start_full'
execute sp_fulltext_catalog 'ft_winner2050', 'start_full'
--至此,全文索引建立完毕。若干数据多就慢慢等它填充完毕。
附件:
没有附件
0
票
顶一下
票
顶一下
0
票
踩一下
票
踩一下
| 文 章 评 论 | ||||||||
| ||||||||



您现在的位置: