$I queries for fuzzy search
11767Dec 16 2002 — edited Dec 20 2002Hi
I fired a query with fuzzy operator sepcifyiing 60 expansions. ( fuzzy(token,20,60,n) ). The tkprof showed following queries -
SELECT/*+INDEX(T "DR$IDXT_MVBB_CONCAT_FULL$X")*/ DISTINCT TOKEN_TEXT FROM
"LOADMGR"."DR$IDXT_MVBB_CONCAT_FULL$I" T WHERE TOKEN_TEXT LIKE :lkexpr and
TOKEN_TYPE NOT IN (1, 2, 5, 9)
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 7 0.00 0.00 0 0 0 0
Execute 91 0.00 1.43 0 0 0 0
Fetch 208 4.48 4.58 0 3308 0 143573
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 306 4.48 6.02 0 3308 0 143573
The execution count is 91 - Why this query is fired 91 times?
There is another query that is executed 60 times - i.e 60 expansions.
SELECT /*+ INDEX(i) */ TOKEN_FIRST,TOKEN_LAST,TOKEN_COUNT,ROWID
FROM
"LOADMGR"."DR$IDXT_MVBB_CONCAT_FULL$I" i WHERE TOKEN_TEXT = :word AND
TOKEN_TYPE = :wtype ORDER BY TOKEN_TEXT, TOKEN_TYPE, TOKEN_FIRST
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 60 0.01 0.01 0 0 0 0
Fetch 177 0.00 0.00 0 297 0 117
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 238 0.01 0.02 0 297 0 117
Can anyone please explain the purpose of the like query and why it is executed a number of times.
Thanks and regards
Pratap