我已经为全文搜索创建了一个目录:
CREATE TABLE [dbo].[full_text](
[client_id] [int] NOT NULL,
[file_id] [bigint] NOT NULL,
[page_number] [int] NULL,
[contents] [nvarchar](max) NULL,
[ID] [int] IDENTITY(1,1) NOT NULL,
CONSTRAINT [PK_full_text] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
create fulltext catalog dd_full_text;
GO
create fulltext index on full_text(contents)
key index PK_full_text on dd_full_text with change_tracking auto
GO
我正在使用相同的查询进行测试:
SELECT *
FROM full_text
WHERE CONTAINS(contents, '"ban*" AND NOT "sab*"');
GO
首先查询速度很快,但在几分钟后进行相同的查询会变得更慢。在此测试期间,我没有插入新行。
请参阅此表:
响应时间ms
我调查了其他帖子:
https://stackoverflow.com/questions/28093909/sql-server-full-text-search-too-slow
SQL Server 2008 Full Text Search – SLOW
SQL Server Full Text Search Very Slow
但我找不到解决方案。