显示标签为“installing”的博文。显示所有博文
显示标签为“installing”的博文。显示所有博文

2012年3月29日星期四

Full Text Searching....THOUSANDS of records!

Hope I am in the correct section.
I am installing a FTS system on an existing system (that used LIKE % queries!! hahaha)
Anyway, it is working pretty well (AND FAST!) but when I type in acommon word like "damage" I get like 32,000 records. Now, theserver handles those records in about one second but the ASP page thatreturns the results takes about one MINUTE to download. When Isave the source, it is almost 12 MEGS!!
So, basically, I am streaming 12 megs across the pipe and I want to reduce that.
I would like the system to detect over maybe 500 records and cancel the search.
I have put a "TOP 500" into the search and that actually works pretty well but is there a better/smarter method?
Thanks!
cbmeeks

Your Top 500 query is good, but you could also do a SELECT COUNT SQL query first getting exactly how may records would be returned. Just replace the fields to be returned by "COUNT(*)".
// Instantiate a Command object...
SqlCommand dbCommand = new SqlCommand();
dbCommand.Connection = yourConnectionObject;
dbCommand.CommandText = "SELECT COUNT(*) " +
"FROM table-name WHERE column-name = 'some-value'";
dbCommand.CommandType = CommandType.Text;

// Execute the Command object...
int returnValue = (int)dbCommand.ExecuteScalar();
if ( returnValue > 500 )
string errorMessage = "Your query brings back " + returnValue.ToString() + " records!";
else
// Execute your regular query...
Or you could also just execute your normal query and test the number of rows in the DataTable:
if ( dataSet.Tables[0].Rows.Count > 500 )
string errorMessage = "Your query brings back " + dataSet.Tables[0].Rows.Count.ToString() + " records!";
else
// Display it...
The last could be your best bet as it only incurs one trip to the database.
NC...

|||Thanks!
What I actually did (after I posted the question) is leave the TOP 200(was 500 but I shortened it) and as I was displaying the results, Iupdated a variable. At the end of the page, I say somethinglike: "Over 200 records found, try narrowing your search".
The disadvantage is that you never really know how many records therewas (201 would be the same as 10,000) and it's at the bottom of thepage. But, I can live with it.
How much overhead would the extra SELECT COUNT method cost? Icould profile it I guess. But everyone is complaining about thespeed now.
I wrote the program 4 years ago when I was a rookie.
At least now even very common words just take a second or two to get the page. :-)
cbmeeks
|||

Run a search for CONTAINS, CONTAINSTABLE, FREETEXT and FREETEXTTABLE Microsoft proprietry implementation of ANSI SQL in SQL Server BOL (books online). Full Text is an add on to SQL Server so you must populate the Microsoft search catalog to get expected results. Hope this helps.

sql

2012年3月21日星期三

Full text search

I am asking about installing Microsoft Search service in SQL Server 2000 in Windows XP Professional

Is that possible?

And By the way it's not possible for me to switch to SQL Server 2005 that I know that full text indexing already exists in it

thanks

To run SQL Server 2000 Full Text in WinXP you must have the Developer edition if not I don't think you can install it except the Eval which with the release of SQL Server 2005 no longer exist. I have not used the SQL Server 2005 version but the person who runs the blog below can answer all your questions. Hope this helps.

http://spaces.msn.com/jtkane/

sql

2012年2月19日星期日

FTS Over SQL Personal Edition

I have several instances of SQL Server 2000 Personal Edition running on 2000
Pro and XP Pro.
Are there any issues with installing Full-Text Search on these machines?
Thanks
hi ray!
"Binder" <rgondzur@.NO_SPAM_aicsoft.com> wrote in message
news:%23k4Erl4XEHA.3044@.TK2MSFTNGP09.phx.gbl...
> I have several instances of SQL Server 2000 Personal Edition running on
2000
> Pro and XP Pro.
> Are there any issues with installing Full-Text Search on these machines?
> Thanks
>
|||Binder,
If you review SQL 2000 BOL title "Features Supported by the Editions of SQL
Server 2000", it states that for the Personal Edition that Full-Text Search
is "Supported (except on Windows 98)". However, and while I've not tested
this with the Personal Edition (as I have with the Developer Edition), to
install FTS you must select "custom installation" from your SQL CD and under
the Server components, select the "Full-text Search" components and it
*should* install SQL FTS. No, to the best of my knowledge, there should not
be any installation issue with installing Full-Text Search on those
machines. However, I'd recommend that you be logged on as either Admin or as
a member of the Admin Group when you do the custom installation.
Regards,
John
"Binder" <rgondzur@.NO_SPAM_aicsoft.com> wrote in message
news:#k4Erl4XEHA.3044@.TK2MSFTNGP09.phx.gbl...
> I have several instances of SQL Server 2000 Personal Edition running on
2000
> Pro and XP Pro.
> Are there any issues with installing Full-Text Search on these machines?
> Thanks
>