How do I make an ORDER BY score query faster?
Answer: Sorting by relevance (SCORE(n)) can be fast if you use the FIRST_ROWS(n) hint. In this case, Oracle Text performs a high-speed internal sort when fetching from the Oracle Text index tables.
Here is an example of this query:
SELECT /*+ FIRST_ROWS(10) */ ID, SCORE(1), TEXT FROM mytable
WHERE CONTAINS (TEXT, 'searchterm', 1) > 0
ORDER BY SCORE(1) DESC;
It is important to note that, there must be no other criteria in the WHERE clause, other than a single CONTAINS.