Groups | Blog | Home
all groups > sql server full text search > may 2006 >

sql server full text search : Which is faster - comments appreciated...


almurph NO[at]SPAM altavista.com
5/31/2006 9:15:25 AM
Hi everyone,

Got a question for you. Which would be faster:

a. Joining 2 separate tables each with a full text index on the
applicable fields

or

b. Joining 2 separate tables - 1 of which has a FTI on the applicable
field and the other table has a non-clustered index on the applicable
fields


Any commensts/suggestions much appreciated.
Al.
almurph NO[at]SPAM altavista.com
6/1/2006 7:16:47 AM
[quoted text, click to view]

Dan - you can use FTI & a join. I know because I have just done so. I
have a funny feeling that we are on slightly different


Example of what I am talking about:

SELECT *
FROM tableNameA as A
INNER JOIN tableNameB as B on A.primary_key = B.primary_key
WHERE CONTIANS(A.ftiFieldName,'"search term A"') and B.name = 'search
term b'


Cheers,
Al.
Daniel Crichton
6/1/2006 9:01:34 AM
almurph@altavista.com wrote on 31 May 2006 09:15:25 -0700:

[quoted text, click to view]

FTI is not used in joins - it is only used with CONTAINS, CONTAINSTABLE,
FREETEXT, and FREETEXTTABLE in the WHERE.

I think the best choice would be a non-clustered index on both tables on the
columns used in the join, which is the missing option c. :)

Dan

Hilary Cotter
6/1/2006 5:45:02 PM
Its can be used in joins if you use containtstable, but what Dan means is
that the key info returned is what the join is done on. The Full-Text index
does not participate directly in the join.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Daniel Crichton
6/2/2006 12:00:00 AM
Hilary wrote on Thu, 1 Jun 2006 17:45:02 -0400:

[quoted text, click to view]

Yep, that's exactly what I meant. :)

Dan

AddThis Social Bookmark Button