10.7 Using Parallel Queries
Oracle Text supports parallel queries on a local CONTEXT
index and across Oracle Real Application Clusters (Oracle RAC) nodes.
In general, parallel queries are optimal for Decision Support System (DSS). They are also optimal for analytical systems that have large data collections, multiple CPUs with a low number of concurrent users, or Oracle RAC nodes.
10.7.1 Parallel Queries on a Local Context Index
Parallel query refers to the parallelized processing of a local CONTEXT
index.
Based on the parallel degree of the index and various system attributes, Oracle determines the number of parallel query workers to be spawned to process the index. Each parallel query worker processes one or more index partitions. This default query behavior applies to local indexes that are created in parallel.
However, for heavily loaded systems with a high number of concurrent users, query throughput is usually not effective with parallel query; if the query is run serially, the top-N hits can usually be satisfied by the first few partitions. For example, take the typical top-N text queries with an ORDER
BY
partition key column:
select * from ( select story_id from stories_tab where contains(...)>0 order by publication_date desc) where rownum <= 10;
These text queries generally do not perform well with a parallel query.
You can disable parallel querying after a parallel index operation with an ALTER INDEX
statement:
Alter index <text index name> NOPARALLEL; Alter index <text index name> PARALLEL 1;
You can also enable or increase the parallel degree:
Alter index <text index name> parallel < parallel degree >;
10.7.2 Parallelizing Queries Across Oracle RAC Nodes
Oracle Real Application Clusters (Oracle RAC) enables you to improve query throughput and scalability as the query load increases.
You can achieve further improvements in Oracle Text performance by physically partitioning the text data and Oracle Text indexes (using local partitioned indexes) and ensuring that partitions are handled by separate Oracle RAC nodes. This way, you avoid duplication of the cache contents across multiple nodes and, therefore, maximize the benefit of Oracle RAC cache fusion.
Oracle supports database object-level affinity, which makes it much easier to allocate index objects ($I
and $R
tables) to particular nodes.
Although Oracle RAC offers solutions for improving query throughput and performance, it does not necessarily enable you to continue to get the same performance improvements as you scale up the data volumes. You are more likely to see improvements by increasing the amount of memory available to the system global area (SGA) cache or by partitioning your data so that queries do not have to hit all table partitions in order to provide the required set of query results.