This section describes Oracle partition indexes in detail.

Source: Internet
Author: User

Oracle partition indexes may be unfamiliar to many new users who are new to Oracle databases. The following describes the knowledge of Oracle partition indexes in detail. We hope that you can learn more about Oracle partition indexes.

Oracle partition index Syntax:

 
 
  1. Table Index  
  2. CREATE [UNIQUE|BITMAP] INDEX [schema.]index_name  
  3. ON [schema.]table_name [tbl_alias]  
  4. (col [ASC | DESC]) index_clause index_attribs  
  5.  
  6. index_clauses:  

Oracle partition indexes are divided into the following two situations:

1 Local Index

The storage location of the index information depends on the Partition information of the parent table. In other words, to create such an index, the parent table must be Partition.

The index information is stored in the tablespace where the partition of the parent table is located. However, you can only create a HashTable or composite partition table in the parent table.

Local store in (tablespace)

You can only create a HashTable or composite partition table in the parent table. The specified number of partitions must be the same as the number of partitions in the parent table.

 
 
  1. LOCAL STORE IN (tablespace)  (PARTITION [partition       [LOGGING|NOLOGGING]       [TABLESPACE {tablespace|DEFAULT}]       [PCTFREE int]       [PCTUSED int]       [INITRANS int]       [MAXTRANS int]       [STORAGE storage_clause]       [STORE IN {tablespace_name|DEFAULT]       [SUBPARTITION [subpartition [TABLESPACE tablespace]]]]) 

The index information is stored in the tablespace where the partition of the parent table is located. This syntax is the simplest and is also the most commonly used partition index creation method.
Local

The number of specified partitions must be the same as that of the parent table.

 
 
  1. LOCAL (PARTITION [partition  
  2. [LOGGING|NOLOGGING]  
  3. [TABLESPACE {tablespace|DEFAULT}]  
  4. [PCTFREE int]  
  5. [PCTUSED int]  
  6. [INITRANS int]  
  7. [MAXTRANS int]  
  8. [STORAGE storage_clause]  
  9. [STORE IN {tablespace_name|DEFAULT]  
  10. [SUBPARTITION [subpartition [TABLESPACE tablespace]]]]) 

2 Global Index

The storage location of the index information is completely irrelevant to the Partition information of the parent table. It doesn't even matter if the parent table is a partition table. Syntax:

 
 
  1. GLOBAL PARTITION BY RANGE (col_list)  
  2. ( PARTITION partition VALUES LESS THAN (value_list)  
  3. [LOGGING|NOLOGGING]  
  4. [TABLESPACE {tablespace|DEFAULT}]  
  5. [PCTFREE int]  
  6. [PCTUSED int]  
  7. [INITRANS int]  
  8. [MAXTRANS int]  
  9. [STORAGE storage_clause] ) 

However, in this case, if the parent table is a partition table, you must update Global Index to delete all partitions of the parent table. Otherwise, the Index information is incorrect.

 
 
  1. ALTER TABLE TableName DROP PARTITION PartitionName  Update Global Indexes 

Implementation of oracle re-Indexing

Complete Oracle File System Parsing

ORACLE system table and data dictionary View

In-depth analysis of Oracle ERP system module

Detailed explanation of four categories of Oracle index Scanning

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.