Oracle DBMS_PCLXUTIL
Version 23c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located anywhere in North America, EMEA, LATAM, or APAC that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Purpose Note: DBMS_PCLXUTIL uses the DBMS_JOB package to provide a greater degree of parallelism for creating a local index for a partitioned table. This is achieved by asynchronous inter-partition parallelism using DBMS_SCHEDULER. DBMS_PCLXUTIL works with both range and range-hash composite partitioning.
AUTHID CURRENT_USER
Dependencies
DBMS_PCLXUTIL_INTERNAL    
Documented Yes: Packages and Types Reference
First Available Not known
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmspclx.sql
 
BUILD_PART_INDEX
Build local partition index dbms_pclxutil.build_part_index (
jobs_per_batch IN NUMBER   DEFAULT 1,
procs_per_job  IN NUMBER   DEFAULT 1,
tab_name       IN VARCHAR2 DEFAULT NULL,
idx_name       IN VARCHAR2 DEFAULT NULL,
force_opt      IN BOOLEAN  DEFAULT FALSE);

jobs_per_batch  -- number of partitions
procs_per_batch -- degree <= max_slaves
force_opt       -- If true forces rebuild of all indexes.
                -- If false rebuild only of index marked UNUSABLE.
-- create tablespace DDL on Partitions page
CREATE TABLE prof_hist (
prof_history_id    NUMBER(10),
person_id          NUMBER(10) NOT NULL,
organization_id    NUMBER(10) NOT NULL,
record_date        DATE NOT NULL,
prof_hist_comments VARCHAR2(2000))
PARTITION BY HASH (prof_history_id)
PARTITIONS 3
STORE IN (part1, part2, part3);

SELECT table_name, partition_name
FROM user_tab_partitions;

CREATE INDEX ix_prof_hist
ON prof_hist(prof_history_id)
LOCAL
UNUSABLE;

-- causes the dictionary entries to be created without "building" the index itself,
-- the time consuming part of creating an index


desc user_ind_partitions

SELECT index_name, partition_name, status
FROM user_ind_partitions;


-- causes a concurrent build of local indexes with the specified degree of parallelism
exec dbms_pclxutil.build_part_index(3, 1, 'PROF_HIST', 'IX_PROF_HIST', TRUE);

SELECT index_name, partition_name, status
FROM user_ind_partitions;

Related Topics
Built-in Functions
Built-in Packages
DBMS_I_INDEX_UTL
DBMS_INDEX_UTL
DBMS_PCLXUTIL_INTERNAL
Indexes
Partitioned Tables and Indexes
What's New In 21c
What's New In 23c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2023 Daniel A. Morgan All Rights Reserved
  DBSecWorx