I am using the June CTP release of SQL Server 2005 on Windows Sever 2003.
Is there a quick way to get a total natch count (estimate is OK)
of a SQL FullText query? I am working with about 10 million r
ows of simple character data.
The following SQL simply returns too slow due to disk IO on the disk
with the relational table when the number of hits is large (say half
millions)
select count(*) from CONTAINSTABLE(MyTableName, FTColumnName, '
"QueryPhrase" ')
Thanks,
Wenbin Zhang
If you need to use a T-SQL to determine the word count of a SQL FTS query,
instead of just using a count(*), it is faster to use a stored proc, for
example:
create proc FTS_t1 (@SearchWord varchar(7800))
as
select c1 from t1 where contains(c2, @SearchWord)
go
create proc FTSCount_t1 (@SearchWord varchar(7800))
as
set nocount on
create table #FTPrimaryKey(t1_UPK int)
insert into #FTPrimaryKey exec FTS_t1 @SearchWord
select count(*) from #FTPrimaryKey
set nocount off
go
-- example of use:
exec FTSCount_t1 '"computer"'
Hope that helps!
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Wenbin Zhang" <zhang_...@hotmail.com> wrote in message
news:%23arzmzV...@TK2MSFTNGP10.phx.gbl...
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/