sql server 创建全文索引
2008-08-22 13:28
387 查看
if (select DATABASEPROPERTY(DB_NAME(), N'IsFullTextEnabled')) <> 1
exec sp_fulltext_database N'enable'
GO
if not exists (select * from dbo.sysfulltextcatalogs where name = N'Q_product')
exec sp_fulltext_catalog N'Q_product', N'create'
GO
if (select DATABASEPROPERTY(DB_NAME(), N'IsFullTextEnabled')) <> 1
exec sp_fulltext_database N'enable'
GO
if not exists (select * from dbo.sysfulltextcatalogs where name = N'Q_product')
exec sp_fulltext_catalog N'Q_product', N'create'
GO
--C_Product为表名称,PK_C_Product为索引名称(要唯一)
exec sp_fulltext_table N'[dbo].[C_Product]', N'create', N'Q_product', N'PK_C_Product'
GO
--TypeMark所要创建全文索引的列
exec sp_fulltext_column N'[dbo].[C_Product]', N'TypeMark', N'add', 2052
GO
exec sp_fulltext_table N'[dbo].[C_Product]', N'activate'
GO
exec sp_fulltext_catalog 'Q_product','start_full'
GO
exec sp_fulltext_table N'[dbo].[C_Product]',N'start_change_tracking'
GO
exec sp_fulltext_table N'[dbo].[C_Product]',N'Start_background_updateindex'
GO
exec sp_fulltext_table N'[dbo].[C_Product]',N'update_index'
GO
exec sp_fulltext_database N'enable'
GO
if not exists (select * from dbo.sysfulltextcatalogs where name = N'Q_product')
exec sp_fulltext_catalog N'Q_product', N'create'
GO
if (select DATABASEPROPERTY(DB_NAME(), N'IsFullTextEnabled')) <> 1
exec sp_fulltext_database N'enable'
GO
if not exists (select * from dbo.sysfulltextcatalogs where name = N'Q_product')
exec sp_fulltext_catalog N'Q_product', N'create'
GO
--C_Product为表名称,PK_C_Product为索引名称(要唯一)
exec sp_fulltext_table N'[dbo].[C_Product]', N'create', N'Q_product', N'PK_C_Product'
GO
--TypeMark所要创建全文索引的列
exec sp_fulltext_column N'[dbo].[C_Product]', N'TypeMark', N'add', 2052
GO
exec sp_fulltext_table N'[dbo].[C_Product]', N'activate'
GO
exec sp_fulltext_catalog 'Q_product','start_full'
GO
exec sp_fulltext_table N'[dbo].[C_Product]',N'start_change_tracking'
GO
exec sp_fulltext_table N'[dbo].[C_Product]',N'Start_background_updateindex'
GO
exec sp_fulltext_table N'[dbo].[C_Product]',N'update_index'
GO
相关文章推荐
- 使用SQL语句为SQL Server 2005创建全文索引
- SQL Server 创建全文索引
- SQL Server创建索引(转)
- 关于Sphinx创建全文检索的索引介绍
- 如何获得数据库里有多少个全文索引。删除全文索引的方法 SQL server 2005
- SQL Server创建索引
- mysql 创建 主键索引 唯一索引 全文索引 多列索引 添加索引
- lucene全文搜索之四:创建索引搜索器、6种文档搜索器实现以及搜索结果分析(结合IKAnalyzer分词器的搜索器)基于lucene5.5.3
- SQL Server 2005中为大型表创建索引
- SQL Server 查询性能优化——创建索引原则(一)(转载)
- SQL Server创建复合索引时,复合索引列顺序对查询的性能影响
- 全文检索工具lucene 之索引创建方法
- SQL Server ->> 分区表上创建唯一分区索引
- SQL Server 创建索引的 5 种方法
- SQL Server 创建索引方法
- 使用sql server中的全文索引
- 系统存储过程创建全文索引
- Sql Server查询性能优化之创建合理的索引(下篇)
- SQL Server查询性能优化——创建索引原则
- 全文索引优化sql server 的like查询