Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How does Oracle Text perform Index lookup?

13095Jun 3 2005 — edited Jun 7 2005
I am just wondering how Oracle Text performs normal Index lookup to satisfy a query. I understand that it uses the $I table to look for docids for a given Token (search word), then goes to the $R table to get the rowid for returned docids. However, when I did a trace of my query, the following are the steps I see.
1. SELECT /*+ INDEX(i) */ TOKEN_FIRST,TOKEN_LAST,TOKEN_COUNT,ROWID
FROM DR$SEARCH_INDEX$I i WHERE TOKEN_TEXT = :word AND TOKEN_TYPE = :wtype ORDER BY TOKEN_TEXT, TOKEN_TYPE, TOKEN_FIRST

2. SELECT TOKEN_INFO FROM
DR$SEARCH_INDEX$I WHERE ROWID = :rid

3. select data from DR$SEARCH_INDEX$I
where row_no = :row_no


My question is, why is there a 2nd SELECT on the $I table (step 2). Why not include the TOKEN_INFO in the first SELECT (step 1).

Thanks,
Jojo
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2005
Added on Jun 3 2005
10 comments
884 views