From: Wolfgang M. <wol...@gm...> - 2005-05-17 09:32:34
|
> I'm adding another query choice (for the users) using matches(), and I > see a noticable performeance degradation when using fn:matches() as > compared to either an exact match or using the &=3D operator. I also > notice that fn:matches() does not use range indexes, but instead the > fulltext index.=20 ... > 16 mai 2005 14:07:44,401 [P1-7] DEBUG (FunMatches.java > [evalWithIndex]:179) - Using index ... The line above indicates that fn:matches is indeed using the range index. Compared to &=3D and equality, your regular expression starts with an anchor and a wildcard: ^.*luodda$. The wildcard requires a full index scan, so it is no surprise that this is slower than &=3D "luodda". If the query string starts with some characters, these characters can be used to limit the range of index entries to scan. You said that fn:matches used to be faster before. Did you try that with the same query string, i.e. including the wildcards? If yes, something is certainly wrong. If not, we still might have to check the performance of the full index scan. I have not done any systematic profiling on the range indexes yet. Wolfgang |