Table Partitioning: create new additional local index

Posted by Valeriy Bashkatov on 23-Jun-2015 06:38

Hello,

Old global index has 1 component - field with name 'DateField'.

Now I want to make the same a local index. 

IndexName: LocalIdx2
Idx Component:  'DateField'

When I try to make new local index instead old global index I get this message:

Field Name 'DateField' is not aligned at position 1 of _Partition-Policy for this table. (17638)

I understand correctly what to make additional a local index I always have to use a partition key as the first component of the index additionally to fields that  I need in this local index?

Regards,
Valeriy

Posted by Richard Banville on 23-Jun-2015 08:02

Local indexes are always “partition aligned”.
 
If you want index sort order on something other than partition aligned leading key components then you create a global index whose key value stored in this btree will contain entries for multiple partitions.
 
The reason we do not support non-partition aligned local indexes is to facilitate retrieving data in the expected sort order across the entire table when using a particular index.  A non-partition aligned local index would require post sorting on the values across the multiple non-partition aligned local index b-trees.  The performance of this would be very poor.
 
[collapse]
From: Valeriy Bashkatov [mailto:bounce-Arelav2@community.progress.com]
Sent: Tuesday, June 23, 2015 7:55 AM
To: TU.OE.RDBMS@community.progress.com
Subject: RE: [Technical Users - OE RDBMS] Table Partitioning: create new additional local index
 
Reply by Valeriy Bashkatov

Yes, I know, but I thought that this requirement only to the index and field(s) when creates a partition from scratch.

I do not think that for all the new additional local indexes is also true.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

All Replies

Posted by Libor Laubacher on 23-Jun-2015 06:43

Yes, the local index leading components have to match your partition policy definition.
 
Someone hasn’t been paying attention at the workshop, last year :p
 
[collapse]
From: Valeriy Bashkatov [mailto:bounce-Arelav2@community.progress.com]
Sent: Tuesday, June 23, 2015 1:40 PM
To: TU.OE.RDBMS@community.progress.com
Subject: [Technical Users - OE RDBMS] Table Partitioning: create new additional local index
 
Thread created by Valeriy Bashkatov

Hello,

Old global index has 1 component - field with name 'DateField'.

Now I want to make the same a local index. 

IndexName: LocalIdx2
Idx Component:  'DateField'

When I try to make new local index instead old global index I get this message:

Field Name 'DateField' is not aligned at position 1 of _Partition-Policy for this table. (17638)

I understand correctly what to make additional a local index I always have to use a partition key as the first component of the index additionally to fields that  I need in this local index?

Regards,
Valeriy

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Valeriy Bashkatov on 23-Jun-2015 06:53

Yes, I know, but I thought that this requirement only to the index and field(s) when creates a partition from scratch.

I do not think that for all the new additional local indexes is also true.

Posted by Richard Banville on 23-Jun-2015 08:02

Local indexes are always “partition aligned”.
 
If you want index sort order on something other than partition aligned leading key components then you create a global index whose key value stored in this btree will contain entries for multiple partitions.
 
The reason we do not support non-partition aligned local indexes is to facilitate retrieving data in the expected sort order across the entire table when using a particular index.  A non-partition aligned local index would require post sorting on the values across the multiple non-partition aligned local index b-trees.  The performance of this would be very poor.
 
[collapse]
From: Valeriy Bashkatov [mailto:bounce-Arelav2@community.progress.com]
Sent: Tuesday, June 23, 2015 7:55 AM
To: TU.OE.RDBMS@community.progress.com
Subject: RE: [Technical Users - OE RDBMS] Table Partitioning: create new additional local index
 
Reply by Valeriy Bashkatov

Yes, I know, but I thought that this requirement only to the index and field(s) when creates a partition from scratch.

I do not think that for all the new additional local indexes is also true.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

This thread is closed