Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Does sorting the results slow a text-only query?

0
Posted

Does sorting the results slow a text-only query?

0

It most certainly does – except when sorting by relevence, or when the table is partitioned by the sort column (of which more later). If you sort by any other criteria – such as date, or price – then Oracle must resolve the entire query before it can pass back any results to the user application. If there is no sorting, then Oracle can return results as it finds them, which is very much quicker in the common case where the application needs to only display a page of results at a time. There is a special case – sorting by relevence (SCORE(n)) can be extremely quick if the FIRST_ROWS hint is used. In this case, the kernel allows the text engine to perform a high speed internal sort when fetching from the text index tables.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.