How can I improve index performance when I create a local partitioned index?
Answer: When you have multiple CPUs, you can improve indexing performance by creating a local index in parallel.
You can create a local partitioned index in parallel in the following ways:
-
Use the
PARALLELclause with theLOCALclause in theCREATE INDEXstatement. In this case, the maximum parallel degree is limited to the number of partitions. -
Create an unusable index, and then run the
DBMS_PCLXUTIL.BUILD_PART_INDEXutility. This method can result in a higher degree of parallelism, especially if you have more CPUs than partitions.
The following is an example of the second method. The base table has three partitions. You create a local partitioned unusable index first, and then run the DBMS_PCLUTIL.BUILD_PART_INDEX, to build the three partitions in parallel (inter-partition parallelism). Inside each partition, index creation occurs in parallel (intra-partition parallelism) with a parallel degree of 2.
create index tdrbip02bx on tdrbip02b(text)
indextype is ctxsys.context local (partition tdrbip02bx1,
partition tdrbip02bx2,
partition tdrbip02bx3)
unusable;
exec dbms_pclxutil.build_part_index(3,2,'TDRBIP02B','TDRBIP02BX',TRUE);