Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 SQL Query Timing Out - Full Text isabout
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 17 March 2005 :  19:20:37  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
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


Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 March 2005 :  20:20:45  Show Profile  Visit HuwR's Homepage
full text searches are not performed by sql, they are performed by the Microsoft Search Service, so it may not be the query that is the problem. Try rebuilding your full text catalog
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 17 March 2005 :  21:54:23  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
Thanks huw for your post. You got me to dig into this more instead of thinking the query could be updated. The SQL Server is maxing out the CPU around 90% while a process is running that is always inserting data. Now at least I know where my problem is at.

Brad
Oklahoma City Online Entertainment Guide
Oklahoma Event Tickets
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07