My Oracle Support Banner

Best Way To Create A Index On Table Partition (Doc ID 3007140.1)

Last updated on MARCH 14, 2024

Applies to:

Oracle Database - Enterprise Edition - Version 19.20.0.0.0 and later
Information in this document applies to any platform.

Goal

 

Question:

When have a table (for example called TABLEX) partitioned for date by month, the partition column for example is START_DATE. Now want to add an index on another date column called ELAB_DATE.

 which is the best way to create index on column ELAB_DATE:


1. Create a index partitioned on not partitioned column on table partitioned: create index IDX1 on TABLEX (ELAB_DATE) LOCAL;

2. Create a index NOT partitioned on not partitioned column on table partitioned: create index IDX1 on TABLEX (ELAB_DATE);

3. Create a index partitioned combined with partitioned column on table partitioned: create index IDX1 on TABLEX (START_DATE, ELAB_DATE);
 
Qn2:If in this table run a following query:

SELECT MAX (START_DATE),
  MAX (ELAB_DATE)
  FROM TABLEX;

Which is the best option to create a index? Will the index speed up the query?
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.