SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Silicon Investor, under the hood

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: InternetPlay who wrote (4)12/12/2004 9:07:41 PM
From: SI Bob   of 81
 
make sure the index is built on subjectid first, and then the message field, I bet you'll see a big performance gain when you run the query in your earlier post, provided that the number of records for the given subjectid is relatively small.

I prefer to keep most indexes as single-field ones with a few exceptions like subjectid, message_order.

Not all searches (relatively few of them, actually) will care about the subjectid except for including it in the returned recordset. Including it just for purposes of making it a covered query wouldn't do any good since I wouldn't be indexing the message text field.

I assume you mean the messageid field rather than the message field.

I doubt SQL Server would let me index a full-text field, but even if it did, it wouldn't do any good. Indexing a field that often contains thousands of characters wouldn't do any good when you're looking for a string that could be several thousand characters deep into the message.

When it comes to message-searching, you either have to use MSSearch (so you can use contains() and other functions) or build your own. I haven't decided to roll my own yet because we're very far from really needing it and might never.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext