Home » Server Options » Text & interMedia » Query expansion and FIRST_ROWS problem (Oracle Database 11g Enterprise Edition Release 11.1.0.6.0)
Query expansion and FIRST_ROWS problem [message #353690] Tue, 14 October 2008 11:22
mys007
Messages: 1
Registered: October 2008
Junior Member
Hello!

I have the following construction:

SELECT p.* FROM ( SELECT q.*, rownum rn FROM (
SELECT /*+ FIRST_ROWS(10) */ SCORE(1) AS score, idf FROM table WHERE CONTAINS(column, **query**, 1) > 0 ORDER BY SCORE(1) DESC, ROWID
) q WHERE rownum <= 10) p WHERE rn > 0;

When I use query:
<query><textquery lang="ENGLISH" grammar="CONTEXT"><progression>
<seq>string within section</seq>
</progression></textquery><score datatype="FLOAT" algorithm="DEFAULT"></query>

I get the results (>10) in some normal time. But with the following query:

<query><textquery lang="ENGLISH" grammar="CONTEXT"><progression>
<seq>string within section</seq>
<seq>fuzzy(string) within section</seq>
<seq>%string% within section</seq>
.....
</progression></textquery><score datatype="FLOAT" algorithm="DEFAULT"></query>

the search is soooo slow. I don't understand it: I set the limit to 10 first rows, which is already satisfied by the first sequence in the query expansion. But Oracle (obviously) seems to execute all the other ones as well!
Another observation: the presence of /*+ FIRST_ROWS(10) */ doesn't really matter from the time viewpoint... Removing the "within" part makes the searching much faster.

So what I am doing wrong? Thank you SOO much for answers!

Martin
Previous Topic: ctx indexes and performance problem
Next Topic: Refresh of indexes on CLOB fields.
Goto Forum:
  


Current Time: Thu Mar 28 18:59:09 CDT 2024