Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / August 2008

Tip: Looking for answers? Try searching our database.

Using FullText Search for file names

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
unique4 - 07 Aug 2008 13:25 GMT
Hello,

I have an SQL Server 2005 database storing file names (millions), and I
currently use LIKE to search the database - most of the time I need to do
searches using a part of the file name. The search is very slow right now.

Will using a FullText index help with performance in this particular
situation? I mean the file names are not really full words in English, so I'm
not sure if this is the right approach.

Thank you
Hilary Cotter - 08 Aug 2008 10:43 GMT
If you want to search on file extenstions, file names (ie the Document1 in
document1.doc), or wildcard is 'Doc*' yes, fts will work great for you.

If you want to search for tokens in the middle, ie ment in document, it
won't work at all.

> Hello,
>
[quoted text clipped - 8 lines]
>
> Thank you
sql411@nospam.com - 12 Aug 2008 22:55 GMT
Searching for part of the filename will work with fulltext, as long as your
wildcard is at the end of the phrase and not the beginning.

If you filename is 'myfilenameisthis.doc' and you do a search like:

select *
from table
where contains(filename, 'myfilename*')

then it should work, but this won't:
select *
from table
where contains(filename, '*myfilename')
unique4 - 15 Aug 2008 10:00 GMT
As far as I know, this limitation applies when using LIKE with a normal
index on a string-type column: queries with wildcards at the end benefit from
the index, those starting with wildcards do not benefit (full table scan).

Are you sure this applies to FullText as well?

Thanks
Daniel Crichton - 18 Aug 2008 13:45 GMT
unique4 wrote  on Fri, 15 Aug 2008 02:00:03 -0700:

> As far as I know, this limitation applies when using LIKE with a normal
> index on a string-type column: queries with wildcards at the end
> benefit from  the index, those starting with wildcards do not benefit
> (full table scan).

> Are you sure this applies to FullText as well?

> Thanks

Check the Books Online - FTS only handles a wildcard at the end, as already
stated.

Signature

Dan

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.