Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
workstuff
Starting Member
2 Posts |
Posted - 2010-04-21 : 09:17:54
|
| HiI have a table (Table1) that is Full Text Indexed and I am running the following query for a free text based search. The query performs well as long as I have only one word like '(FORMSOF (INFLECTIONAL,Computer))'. But as soon as there are multiple words the performance begins to deteriorate, for the first time the query is run. Anyone have any idea why this is happening and how do I improve the performance when there are multiple words that are being AND'ed. I tried adding "ORDER BY CT.Rank" and "ORDER BY CT.[Key]" but it did not seem to make difference.Thanks in advance.SELECT UniqueIDFROM ( SELECT TOP (500) N.TransactionID, ROW_NUMBER() OVER (ORDER BY N.ProcessingID) AS RowNumber FROM CONTAINSTABLE(NewsLive.dbo.Table1, (XmlText,Headline), '(FORMSOF (INFLECTIONAL, Computer) AND FORMSOF (INFLECTIONAL, Weekly))') AS CT INNER JOIN Database.dbo.Table1 N (NOLOCK) ON N.ProcessingID = CT.[KEY] WHERE CT.[KEY] BETWEEN 989324453000000 AND 989849440000103 ) A INNER JOIN Database.dbo.Table2 vp (NOLOCK) ON A.Col2 = vp.Col1WHERE RowNumber >= 1 ORDER BY ProcessingID |
|
|
|
|
|