Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Slow Contains queries with wildcards |
Tue, Oct 5 2010 7:35 AM | Permanent Link |
Igor Colovic | In my application I have a option for searching words in documents. When users use wildcards to search for word parts the query is very slow. The problem is in BuildUnoptimizedContainsBitmap function witch is searching the whole index. I know this is a must when the search term is starting with *, but when the search term is starting with regular character (not a WILDCARD) it would be wise to use something like this:
procedure TEDBFilterIndexNavigator.BuildUnoptimizedContainsBitmap( ... FKeyValues.Items[0].AsString := StringReplace(Value, '*', '', [rfReplaceAll]); .... if (Search(FKeyValues, StringLength(FKeyValues.Items[0].AsString), ArgumentTokens[0].IgnoreCase, FoundChanges)=CMP_EQUAL) And (Not FoundChanges) then while (not EOF) do begin if LikeString(IndexManager.ActiveIndex.IndexColumns[0].Collation, .... I know this is not an optimal and correct source, because there is not checking if the word is starting with wildchard, but it is a suggestion. I hope this will go to the next build. Best regards Igor Colovic Igor.Colovic@intermex.biz http://www.propisi.com |
Tue, Oct 5 2010 8:59 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Igor,
<< In my application I have a option for searching words in documents. When users use wildcards to search for word parts the query is very slow. The problem is in BuildUnoptimizedContainsBitmap function witch is searching the whole index. I know this is a must when the search term is starting with *, but when the search term is starting with regular character (not a WILDCARD) it would be wise to use something like this: >> We already do this with the LIKE, so yes, it can be done. However, it will only work with the ANSI or UNI collations, and won't work with other collations. I'll see what I can do about adding this in an upcoming build. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Oct 7 2010 6:41 AM | Permanent Link |
Igor Colovic | "Tim Young [Elevate Software]" wrote:
>>We already do this with the LIKE, so yes, it can be done. However, it will only work with the ANSI or UNI collations, and won't work with other collations. I am already using UNI collation (UNICODE version of EDB) >>I'll see what I can do about adding this in an upcoming build. Thank You. Igor Colovic Igor.Colovic@intermex.biz www.propisi.com |
Wed, Oct 20 2010 6:18 AM | Permanent Link |
Igor Colovic | "Tim Young [Elevate Software]" wrote:
>>We already do this with the LIKE, so yes, it can be done. However, it will only work with the ANSI or UNI collations, and won't work with other collations. Is there any news about adding this and when will next build be out. Thank You. Igor Colovic Igor.Colovic@intermex.biz www.propisi.com |
Sun, Oct 24 2010 2:14 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Igor,
<< Is there any news about adding this and when will next build be out. >> I'll try to get it into 2.04 B5, but no guarantees. 2.04 B5 should be out sometime this week after the PHP extension is released. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, May 6, 2024 at 03:23 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |