Home php教程 php手册 SQL Server全文检索简介

SQL Server全文检索简介

Jun 13, 2016 am 10:04 AM
server sql Full Text Search Function and it New yes of Introduction index able

全文索引和全文检索是sql server 7.0的新增功能,它能够对数据中的字符类型列(如varchar、text等类型列)进行索
引,并通过索引实现全文搜索查询。sql server常规索引与全文检索相比,二者的区别如下:
常规索引 全文索引
使用create index或约束定义创建 使用全文索引存储过程创建和删除
通过删除或执行drop index语句删除
当插入、修改或删除数据时,sql server 只能通过任务调度或执行存储过
能够自动更新常规索引内容 程来填充全文索引
每个表可以建立多个常规索引 每个表只能有一个全文索引
索引不能分组 同一个数据库中的多个全文索引可
以组织为一个全文目录
常规索引存储在数据库文件中 全文索引存储在文件系统中
为了支持全文索引操作,sql server 7.0新增了一些新存储过程和transact-sql语句,使用这些存储过程创建全文索引的
具本步骤为(括号内为每步所调用的存储过程名称):
(1)启动数据库的全文处理功能(sp_fulltext_datebase);
(2)建立全文目录(sp_fulltext_catalog);
(3)在全文目录中注册需要全文索引的表(sp_fulltext_table);
(4)指出表中需要全文检索的列名(sp_fulltext_column)
(5)为表创建全文索引(sp_fulltext_table);
(6)填充全文索引(sp_fulltext_catalog)。
例:
use pubs
go
exec sp_fulltext_database 'enable'
--为titles表建立全文索引数据元,其中create为建立,activate为激活,deactivate为关闭表全文索引的激活状态,使
它不再参加全文目录填充,drop为删除;create参数中,后面跟的是全文目录名称和索引列名。
--下面语句为pubs数据库中的titles表创建全文索引数据元,存储该数据元的全文目录为FT_pubs,所使用的唯一索引为
UPKCL_titleidind(title表中为title_id列的PRIMARY KEY约束所建立的唯中索引)
sp_fulltext_table titles,'create','FT_pubs','upkcl_titledind'
--激活它
sp_fulltext_table titles,'activate'
--指定参加全文索引的列
sp_fulltext_column 'titles','title','add'
sp_fulltext_column 'titles','notes','add'

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the difference between HQL and SQL in Hibernate framework? What is the difference between HQL and SQL in Hibernate framework? Apr 17, 2024 pm 02:57 PM

HQL and SQL are compared in the Hibernate framework: HQL (1. Object-oriented syntax, 2. Database-independent queries, 3. Type safety), while SQL directly operates the database (1. Database-independent standards, 2. Complex executable queries and data manipulation).

The difference between vivox100s and x100: performance comparison and function analysis The difference between vivox100s and x100: performance comparison and function analysis Mar 23, 2024 pm 10:27 PM

Both vivox100s and x100 mobile phones are representative models in vivo's mobile phone product line. They respectively represent vivo's high-end technology level in different time periods. Therefore, the two mobile phones have certain differences in design, performance and functions. This article will conduct a detailed comparison between these two mobile phones in terms of performance comparison and function analysis to help consumers better choose the mobile phone that suits them. First, let’s look at the performance comparison between vivox100s and x100. vivox100s is equipped with the latest

What exactly is self-media? What are its main features and functions? What exactly is self-media? What are its main features and functions? Mar 21, 2024 pm 08:21 PM

With the rapid development of the Internet, the concept of self-media has become deeply rooted in people's hearts. So, what exactly is self-media? What are its main features and functions? Next, we will explore these issues one by one. 1. What exactly is self-media? We-media, as the name suggests, means you are the media. It refers to an information carrier through which individuals or teams can independently create, edit, publish and disseminate content through the Internet platform. Different from traditional media, such as newspapers, television, radio, etc., self-media is more interactive and personalized, allowing everyone to become a producer and disseminator of information. 2. What are the main features and functions of self-media? 1. Low threshold: The rise of self-media has lowered the threshold for entering the media industry. Cumbersome equipment and professional teams are no longer needed.

What are the functions of Xiaohongshu account management software? How to operate a Xiaohongshu account? What are the functions of Xiaohongshu account management software? How to operate a Xiaohongshu account? Mar 21, 2024 pm 04:16 PM

As Xiaohongshu becomes popular among young people, more and more people are beginning to use this platform to share various aspects of their experiences and life insights. How to effectively manage multiple Xiaohongshu accounts has become a key issue. In this article, we will discuss some of the features of Xiaohongshu account management software and explore how to better manage your Xiaohongshu account. As social media grows, many people find themselves needing to manage multiple social accounts. This is also a challenge for Xiaohongshu users. Some Xiaohongshu account management software can help users manage multiple accounts more easily, including automatic content publishing, scheduled publishing, data analysis and other functions. Through these tools, users can manage their accounts more efficiently and increase their account exposure and attention. In addition, Xiaohongshu account management software has

Python ORM Performance Benchmark: Comparing Different ORM Frameworks Python ORM Performance Benchmark: Comparing Different ORM Frameworks Mar 18, 2024 am 09:10 AM

Object-relational mapping (ORM) frameworks play a vital role in python development, they simplify data access and management by building a bridge between object and relational databases. In order to evaluate the performance of different ORM frameworks, this article will benchmark against the following popular frameworks: sqlAlchemyPeeweeDjangoORMPonyORMTortoiseORM Test Method The benchmarking uses a SQLite database containing 1 million records. The test performed the following operations on the database: Insert: Insert 10,000 new records into the table Read: Read all records in the table Update: Update a single field for all records in the table Delete: Delete all records in the table Each operation

What is PHP used for? Explore the role and functions of PHP What is PHP used for? Explore the role and functions of PHP Mar 24, 2024 am 11:39 AM

PHP is a server-side scripting language widely used in web development. Its main function is to generate dynamic web content. When combined with HTML, it can create rich and colorful web pages. PHP is powerful. It can perform various database operations, file operations, form processing and other tasks, providing powerful interactivity and functionality for websites. In the following articles, we will further explore the role and functions of PHP, with detailed code examples. First, let’s take a look at a common use of PHP: dynamic web page generation: P

Understanding VSCode: What is this tool used for? Understanding VSCode: What is this tool used for? Mar 25, 2024 pm 03:06 PM

"Understanding VSCode: What is this tool used for?" 》As a programmer, whether you are a beginner or an experienced developer, you cannot do without the use of code editing tools. Among many editing tools, Visual Studio Code (VSCode for short) is very popular among developers as an open source, lightweight, and powerful code editor. So, what exactly is VSCode used for? This article will delve into the functions and uses of VSCode and provide specific code examples to help readers

Application of Python ORM in big data projects Application of Python ORM in big data projects Mar 18, 2024 am 09:19 AM

Object-relational mapping (ORM) is a programming technology that allows developers to use object programming languages ​​to manipulate databases without writing SQL queries directly. ORM tools in python (such as SQLAlchemy, Peewee, and DjangoORM) simplify database interaction for big data projects. Advantages Code Simplicity: ORM eliminates the need to write lengthy SQL queries, which improves code simplicity and readability. Data abstraction: ORM provides an abstraction layer that isolates application code from database implementation details, improving flexibility. Performance optimization: ORMs often use caching and batch operations to optimize database queries, thereby improving performance. Portability: ORM allows developers to

See all articles