Now I know this is a long query and its built per each user so I can not use a SP. How can I make this query not time out? I am running it thru a ASP page and the data table has 109,310 records in it and growing fast every hour.
SELECT TOP 10 Data.Data_ID, Data.Data_FeedID, Data.Data_Title, Data.Data_Link, Data.Data_Desc, Data.Data_Date, WEIGHT.RANK AS RSSFeedRanking
FROM RSS_Feeds_Data Data
INNER JOIN CONTAINSTABLE(RSS_Feeds_Data, Data_Desc, 'ISABOUT ("integrated resource management", "Reputable Search Engine Optimization", "search engine optimization lake tahoe", "custom search engine marketing packages", "Engine Optimization Search Specialist", "search engine marketing packages", "Search Engine Optimization Specalist", "economical search engine optimization", "custom search engine marketing", "Search Engine Optimization Specialist", "search engine optimization guidelines", "search engine optimization tips", "search engine marketing", "search engine optimization marketing", "search engine optimization services")')
WEIGHT ON Data.Data_ID = WEIGHT.[KEY]
WHERE Data.Data_Title NOT LIKE '%[ ]****[,.;!? ]%' OR Data.Data_Desc NOT LIKE '%[ ]****[,.;!? ]%' OR Data.Data_Title NOT LIKE '%[ ]****[,.;!? ]%' OR Data.Data_Desc NOT LIKE '%[ ]****[,.;!? ]%' OR Data.Data_Title NOT LIKE '%[ ]shit[,.;!? ]%' OR Data.Data_Desc NOT LIKE '%[ ]shit[,.;!? ]%' OR Data.Data_Title NOT LIKE '%[ ]***[,.;!? ]%' OR Data.Data_Desc NOT LIKE '%[ ]***[,.;!? ]%' OR Data.Data_Title NOT LIKE '%[ ]*****[,.;!? ]%' OR Data.Data_Desc NOT LIKE '%[ ]*****[,.;!? ]%' OR Data.Data_Title NOT LIKE '%[ ]wank[,.;!? ]%' OR Data.Data_Desc NOT LIKE '%[ ]wank[,.;!? ]%'
ORDER BY WEIGHT.RANK DESC
DATABASE STRUCTURE
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[RSS_Feeds_Data]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[RSS_Feeds_Data]
GO
CREATE TABLE [dbo].[RSS_Feeds_Data] (
[Data_ID] [int] IDENTITY (1, 1) NOT NULL ,
[Data_FeedID] [int] NULL ,
[Data_Title] [nvarchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Data_Link] [nvarchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Data_Desc] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Data_Date] [nvarchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[RSS_Feeds_Data] WITH NOCHECK ADD
CONSTRAINT [PK_RSS_Feeds_Data_1] PRIMARY KEY CLUSTERED
(
[Data_ID]
) ON [PRIMARY]
GO
CREATE INDEX [RSS_Feeds_Data3] ON [dbo].[RSS_Feeds_Data]([Data_FeedID], [Data_Date]) ON [PRIMARY]
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'FT_RSS_Feed_Data')
exec sp_fulltext_catalog N'FT_RSS_Feed_Data', N'create'
GO
exec sp_fulltext_table N'[dbo].[RSS_Feeds_Data]', N'create', N'FT_RSS_Feed_Data', N'PK_RSS_Feeds_Data_1'
GO
exec sp_fulltext_column N'[dbo].[RSS_Feeds_Data]', N'Data_Title', N'add', 1033
GO
exec sp_fulltext_column N'[dbo].[RSS_Feeds_Data]', N'Data_Link', N'add', 1033
GO
exec sp_fulltext_column N'[dbo].[RSS_Feeds_Data]', N'Data_Desc', N'add', 1033
GO
exec sp_fulltext_column N'[dbo].[RSS_Feeds_Data]', N'Data_Date', N'add', 1033
GO
exec sp_fulltext_table N'[dbo].[RSS_Feeds_Data]', N'activate'
GO